Bug 1490

Summary: _this() is more innefficient than it needs to be.
Product: TAO Reporter: Carlos O'Ryan <coryan>
Component: IDL CompilerAssignee: DOC Center Support List (internal) <tao-support>
Status: ASSIGNED ---    
Severity: normal    
Priority: P3    
Version: 1.3.1   
Hardware: All   
OS: All   

Description Carlos O'Ryan 2003-04-09 20:54:23 CDT
_this() is implemented in terms of Servant_Base::_create_stub().  After
obtaining a TAO_Stub from the Servant_Base _this() allocates a CORBA::Object
(see bug 1489 about some problems with that.)

However, the implementation of _create_stub() *already* created a CORBA::Object,
but it chooses to unwrap the TAO_Stub and return *that*.

The code would be much more efficient, and shorter, if Servant_Base had a
_this_impl() method that returned the CORBA::Object_ptr directly, then the
_this() method would only need to use _narrow.

I do not know if _create_stub() is used anywhere else, but a cursory inspection
 indicates that it is not, if so, it can be completely removed.
Comment 1 Jeff Parsons 2003-04-10 17:02:24 CDT
Accepted.