[omniORB] Re: footprint of omniorb is about 900KB; can it be reduced?

Duncan Grisby dgrisby@uk.research.att.com
Mon, 26 Nov 2001 10:13:41 GMT


In article <3BFACF6A.890FE7D@kegel.com>, Dan Kegel  <dank@kegel.com> wrote:

[...]
>That's quite good.  Still, is there any way to reduce the footprint
>further without switching to static linking?

There are a couple of easy things to cut out. The first is the
exception logging that you get with -ORBtraceLevel 10 or higher. That
adds a bit of space overhead to each system exception that is thrown.
You can kill it by adding

#define OMNIORB_NO_EXCEPTION_LOGGING

to the top of include/omniORB3/CORBA_sysdep.h and rebuilding
absolutely everything.

The other thing is to remove all the logging. That will get rid of a
lot of strings, which may or may not help with the resident set size.
If your compiler is clever enough, you can probably get rid of a lot
of them by changing two inline functions in include/omniORB3/omniORB.h

If you change the trace() function to always return 0 and change
logs() to just return without doing anything, that will disable the
majority of the logging output. If you are lucky, your compiler will
spot that the code is unreachable and miss it out altogether. If it
doesn't, you'll have to manually remove all the logging.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --