From: Adrien Gervaise (adrien.gervaise_at_[hidden])
Date: 2005-08-18 03:00:04
We've been successfully using the boost serialization library on various
One one occasion though, we had to make a modification in the source code
in order to improve the performance of
the process :
The library uses a set (in basic_oarchive.cpp) to keep track of the
serialized objects. In our project, a very high
number of relatively small objects are serialized through pointers and
references to each other, and the number of
elements in the set could rocket to several millions. This led to memory
fragmentation and very high performance
hits after the first serialization (on a Windows XP platform at least).
We just added a boost::fast_pool_allocator on the set of serialized
pointers. The set is cleared in the destructor
of the archive, after which release_memory() is called on the pool.
This simple patch could reduce the time to perform a whole save from
several minutes to a few seconds.
-- Adrien Gervaise MasaGroup SCI
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk