[omniORB] avoiding _is_a calls

Duncan Grisby duncan at grisby.org
Fri Feb 11 12:01:28 GMT 2005


On Thursday 10 February, Scott Robertson wrote:

> I'm trying to optimize an application by avoiding as many network calls
> as possible. One thing I notice is that my app does allot of _is_a calls
> on all my objects. How do you avoid that?
> 
> I thought as long as my type's matched it doesn't need to invoke _is_a.

By default, the first time you contact a particular object, omniORB
always makes one preliminary call to check that the object exists. It
does this for various reasons, including avoiding the overhead of
marshalling potentially large arguments only to find that the object
does not exist, or has been forwarded to elsewhere.

There are two possible calls that omniORB can do. If it is certain about
the type of the object, it issues a LocateRequest message; if it is not
certain about the type, it calls _is_a.

In your situation, if you are using C++, I would expect you to have a
LocateRequest rather than an _is_a call. If you are using Python, though
(as I suspect you are), omniORBpy often issues an _is_a call instead of
a LocateRequest because it's easier to implement that way, and makes no
practical difference.

You can turn off both the call to _is_a and the LocateRequests by
setting the nicely named assertObjectsExistsAndType parameter to 0, on
the command line or in the config file.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list