Re: TMapFile.Update() too slow?

Rene Brun (Rene.Brun@cern.ch)
Mon, 19 Apr 1999 14:19:38 +0000


Anton wrote:
>
> Hi Rooters,
>
> I found that if I have a loop where I fill, say 20-30 histograms
> ("on-line") I can get about 250kb/sec filling speed (or rather a data
> flow which goes from EventBuilder to Producer) on a "fast" computer.
> Then if I add TMapFile.Update(); at the end of the loop, the data flow
> goes down to 5-10kb/sec. Is it something what should be expected?
>
> PS. Actually I don't need to update the file every time I go through the
> fill loop but anyway ...
>

Hi Anton,
The TMapFile class is not a true shared memory facility. We did not find
a way
in C++ to map two objects in a shared memory area. This is trivial in C
or
if your class does not have virtual functions. In C++, there are
problems with
the mapping of the VTBL tables between the two processes.
The TMapFile class assumes that you copy from time to time a fresh copy
of your live objects to the shared area where it can be imported in turn
by
the client process.
You use TMapFile::Update to import the registered list of objects into
the shared memory. You should not call this function everytime
you fill an histogram.

Rene Brun