Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-03-17 21:35:32


I would guess its possible but I don't know for sure that's were any
performance bottleneck is. The new version of native binary archive
uses streambuf i/o instead of basic_stream i/o which should be
noticibly faster since it does use a mutex lock on each i/o. That
might help.

Initalizing an archive basically just consists of writing a small header
you might try using no_header on construction to see if that helps.

You might try reusing the stream and just create a new archive- that
might help.

You might create a custom variation of a standard stream buf which
maps to sending UDP packets.

You might make your own version of native_binary which doesn't
use a stream but uses some faster way if setting up to send UDP
packets.

Good Luck

Robert Ramey

Marcin Kalicinski wrote:
> I'm using serialization library to create UDP packets. My program is
> sending/receiving hundreds of these each second. I'm currently
> creating iarchive/oarchive for every packet sent/received. This is
> quite a performance bottleneck. Is it possible to reuse single binary
> archive
> object for all UDP packets? I.e. somehow reinitialize underlying
> stream with new data and read/write to the same archive again?
>
> thank you,
> Marcin
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk