[omniORB] Performance of Sequences

Thorsten Roskowetz glowstars@gmx.de
Mon, 21 Aug 2000 20:51:56 +0200 (MEST)


David Sansom wrote:

> Maybe I'm doing something wrong, but I am now tempted to revert to my
> dog-eared copy of 'UNIX Network Programming' by Stevens and wave a sad
> farewell to Corba (!)

It's difficult to give an advice without a glimpse on your code.
Some tips that might be helpful:

- When you construct a sequence variable, supply an anticipated
  maximum number of elements using the maximum constructor.  If the
  sequence has some idea of the expected number of elements, it can
  chunk memory allocations more efficiently

- If you are really transmitting binary data, use sequence<octet>
  instead of sequence<char>. All basic types except octet are subject
  to changes in representation as they are transmitted between clients
  and servers.  Have a look at what the data constructor for sequences
  does (H&V, p.187f)

- Keep in mind that your entire result sequence must be buffered in
  memory during call dispatch, so eventually the operation will fail
  because of memory limitations.  Consider the use of Iterators (either
  a pull iterator or a push iterator; H&V, p.800f)

Cheers,

Thorsten Roskowetz

-- 
Sent through GMX FreeMail - http://www.gmx.net