Boost logo

Boost :

From: Dean Michael Berris (dmberris_at_[hidden])
Date: 2008-06-13 03:55:45

Hi Everyone,

In the 1.35.0 release, I see that boost/archive/array/iarchive.hpp has
a commented out 'load_optimized' function which is not commented out
in the trunk.

When deserializing to an std::vector<uint32_t,
boost::pool_allocator<uint32_t> >, I see that the optimized
implementation will first get the correct size, set the receiving
container's size correctly, and then put the contents of the array
into the container.

The question I have is why is this function commented out in the 1.35.0 release?

I had to find out the hard way that this causes insane memory usage
when deserializing to an std::vector<uint32_t,
boost::pool_allocator<uint32_t> >, mainly because if it uses an
implementation that grows the vector one element at a time, can (and
usually would) cause multiple calls to resize the container and make a
lot of calls to the pool allocator. The way the pool allocator grows
causes an abrupt usage in memory unnecessarily.

Should this be considered a blocker issue that merits a 1.35.1 release?

Insights would be most appreciated.

My solution for the meantime is to stick to the Boost svn trunk
version that I know the current application I'm working on works fine
with -- eventually though I hope to be able to move to a "stable"
Boost release.

Dean Michael C. Berris
Software Engineer, Friendster, Inc.

Boost list run by bdawes at, gregod at, cpdaniel at, john at