[omniORB] omniidl-generated file size

Sai-Lai Lo S.Lo@orl.co.uk
03 Feb 1999 11:18:35 +0000


>>>>> Aaron Van Couwenberghe writes:

> Yes, the berlin group has noticed this in a major way. Before the recent
> interface reorganization (which makes things a little less flexible...) our
> communication library (linked skeletons into one shared lib) was more than
> seven megabytes from 115k of IDL.
> 	Take a look at the way TAO accomplishes this. Upon parsing an IDL,
> tao_idl emits three groups of files: C.{h|cc|i}, S.{h|cc|i}, and
> S_T.{h|cc|i}. Personally I think this is a bit of overkill, as it makes
> things overly complicated.
> 	However, omni could benefit from this scheme. the S_T group is what
> defines needed server templates (helper stuff?); the S group defines skeleton
> methods; the C group defines proxy methods.

> Now, we're down to 2.5 megs because of reorganization, and the interface
> won't be changing much. so we don't *need* anything more fine-grained
> although it would help a bit ;)


We have to be careful about splitting the stubs into too many header and
C++ files. Keep it simple!! The recent split is, in my opinion,
suboptimal. However, I'm open to suggestion for a better scheme.

Please give me some figures. For example, what saving in code size do you get
if you split out the implementation skeleton (class *SK) from the SK.cc
files?


> Also, another question, about how omniidl generates skeletons. I've been
> thinking about the DynSK created for every interface regardless of whether
> it uses dynamic any's. Is there a way to just have omniidl autodetect this
> and only generate what is needed, eliminating the need for this split?
> 	I am not completely familiar with the corba spec with regard to this
> issue. so if my take is wrong feel free to correct me ;)

Well, if you use DynAny to create TypeCode and to marshal data types into
and out of Any, you do not need DynSK. If you have in your code:

StructT x;
CORBA::Any y;

y <<= x;

Then you must have DynSK in order to link in the operator for marshalling
StructT into an Any. I do not think omniidl2 can autodetect this.

Regards,

Sai-Lai

-- 
Dr. Sai-Lai Lo                          |       Research Scientist
                                        |
E-mail:         S.Lo@orl.co.uk          |       Olivetti & Oracle Research Lab
                                        |       24a Trumpington Street
Tel:            +44 223 343000          |       Cambridge CB2 1QA
Fax:            +44 223 313542          |       ENGLAND