[omniORB] Estimating Size of Ugly Nested Structs in Python

Gary D. Duzan gdd0@gte.com
Fri, 06 Jul 2001 10:19:07 -0400


In Message <3B45C5C2.6429FAB9@isogen.com> ,
   "W. Eliot Kimber" <eliot@isogen.com> wrote:

=>Duncan Grisby wrote:
=>
=>> You can use omniORB.cdrMarshal to marshal the struct into a string.
=>> The resulting string is exactly the data which will be transmitted, so
=>> its length tells you what you need to know.
=>
=>Cool--that works a treat. 
=>
=>Follow up: some experiments with pickle show that the pickled size of
=>the struct is an order of magnitude or more greater than the marshalled
=>size. This is good news in general and I think demonstrates that IIOP is
=>pretty darn efficient for data transfer.

   That makes sense since since pickle has to keep all the type
information around for everything it encodes, while CDR (GIOP/IIOP)
gets around a lot of that by having the type information encoded
in the IDL on both ends. If you were pass your structs in CORBA::Anys,
forcing it to include type information, you'd probably see the CDR
size grow to more closely match the pickle size.

					Gary Duzan
					Verizon IT