Bug 1490 - _this() is more innefficient than it needs to be.
Summary: _this() is more innefficient than it needs to be.
Status: ASSIGNED
Alias: None
Product: TAO
Classification: Unclassified
Component: IDL Compiler (show other bugs)
Version: 1.3.1
Hardware: All All
: P3 normal
Assignee: DOC Center Support List (internal)
URL:
Depends on:
Blocks:
 
Reported: 2003-04-09 20:54 CDT by Carlos O'Ryan
Modified: 2018-01-15 11:21 CST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.