
Thanks for the answers! I've tested some other cases based on your suggestions and now have the following situation: - I create package classes which are derived from base classes, these will hold non-pointer objects - The packages split the objects into categories - On the lowest level I have a list of shared_ptr<Package> - That way I still have some kind of dynamic without wasting to much performance I guess that's at least somehow what Robert suggested. The problem I have with this is the following: My application uses shared_ptr to hold most of the data. So if i want to create a package I would have to copy the data first before I can put it into the container within the package. Am I right or have I missed some part of the idea? Stefan Strasser-2 wrote:
Zitat von Robert Ramey
: For now I would suggest
d) Make your own stream buffer implementation which sends the raw data down the pipe.
you might find some inspiration for this here: https://svn.boost.org/svn/boost/sandbox/transaction/boost/transact/archive.h... https://svn.boost.org/svn/boost/sandbox/transaction/boost/transact/char_arch...
it isn't a streambuf implementation but a Boost.Serialization archive that can write to any output iterator with a "char" valuetype. e.g. serialization_oarchive< char_oarchive< std::back_insert_iterator< std::vector<char> >
by writing an output iterator to a fixed-size network buffer you should be able to efficiently send your network message in chunks.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- View this message in context: http://old.nabble.com/Performance-of-boost%3A%3Aserialization-tp29739639p297... Sent from the Boost - Users mailing list archive at Nabble.com.