
19 Aug
2005
19 Aug
'05
10:21 a.m.
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).
I'm assuming you are using Visual Studio - In our app we call _set_sbh_threshold(1016) at the very beginning. This speeds up memory allocations noticeably. The non-standard function is declared in malloc.h -- /Johan.