Boost logo

Boost Users :

From: Pfligersdorffer, Christian (Christian.Pfligersdorffer_at_[hidden])
Date: 2008-07-16 10:21:46


boost-users-bounces_at_[hidden] on Wednesday, July 16, 2008 2:06 PM:

> The problem with this solution is that it is time consuming,
> to open file for a key, i would like to use the boost
> serializeation to improve time preformance.
>
> What is realy required is some mechanism, to identify an
> instance according to its key and only than read its data.
> Thus reading only the required instnace (accordig to its key)
> and not also the previous data at the file, someting like seek.
>
> I hoped that "XML boost" can supply someting like that, but could not
> find how.

Hi Ariella!

It's not there. boost::archive works sequentially on a stream and that's
it, so if you need to skip large portions of data you will have to
divide your data into multiple files and/or multiple chunks in one
stream. I did the latter and it works fine if you build some kind of
meta-information structure on where chunks begin and end. This enables
you to seek a specific chunk of data and process that with an archive.

In any case, if you want to improve performance of your app use
(portable) binary instead of xml archives!

Good luck,

--
Christian Pfligersdorffer
Software Engineering
http://www.eos.info
 

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