Boost logo

Boost Users :

Subject: Re: [Boost-users] Performance of boost::serialization
From: Daniel Herb (physhh_at_[hidden])
Date: 2010-09-18 10:03:09


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 <ramey_at_[hidden]>:
>
>> 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.hpp
> https://svn.boost.org/svn/boost/sandbox/transaction/boost/transact/char_archive.hpp
>
> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>

-- 
View this message in context: http://old.nabble.com/Performance-of-boost%3A%3Aserialization-tp29739639p29746385.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net