Please report new issues athttps://github.com/DOCGroup
A possible optimization in the generated code, but not sure if this would work. We have to check this. Code if from TAO/tests/IDL_Test. Placeholder because Jeff is busy with other things at this moment. Then another issues, but this is something I don't know for sure. Take the following code from anonymousC.cpp: // TAO_IDL - Generated from // be\be_visitor_operation/operation_cs.cpp:78 char * All_Anon::anon_bd_string_test::TestFunc ( ACE_ENV_SINGLE_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException )) { if (!this->is_evaluated ()) { ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this); } if (this->the_TAO_anon_bd_string_test_Proxy_Broker_ == 0) { All_Anon_anon_bd_string_test_setup_collocation (); } I wonder if the check for the_TAO_anon_bd_string_test_Proxy_Broker_ could be done within the if check for !this->is_evaluated (). The is_evaluated is only called once, the the_TAO_anon_bd_string_test_Proxy_Broker_ is checked each time, but what if there is just no collocation possible, then this All_Anon_anon_bd_string_test_setup_collocation () is called each time again. When we move it within the if we just try to setup things once. I am not sure if this impacts other things.
Seems the answer to Johnny's question lies in whether tao_object_initialize() is ever called elsewhere. If so, then the setup_collocation call could get skipped.
Did we ever get any resolution on this?
no, so far as I know we didn't test if this optimization works.
Okay, I'll leave it open then, so we can possibly come back to it at a later date.
the is_evaluated flag can be set by true dependent on the creation, so the check is needed, we can't move it into the is_evaluated check