Boost Users :
Subject: [Boost-users] [Serialization] Boost serialization how to speed it up?
From: tang qingxiong (tqxtqx_at_[hidden])
Date: 2011-06-13 00:18:48
I am currently trying to use boost serialization in my code and is
encountering some performance issues mainly with speed of
serialization and de-serialization. I am coding such that it is able
to choose to serialize in both binary and XML format. My binary size
is currently about 180+MB which takes a while to de-serialize
Below is a sample of my code for the serialization of a struct. I have
quite a few of them but they are all similarly implemented
void serialize( Archive& theArchive, sim::SpeedStruct& theValue,
const unsigned int theVersion )
theArchive & BOOST_SERIALIZATION_NVP(theValue.XValue);
theArchive & BOOST_SERIALIZATION_NVP(theValue.YValue);
theArchive & BOOST_SERIALIZATION_NVP(theValue.ZValue);
BOOST_CLASS_VERSION( SpeedStruct, 1 );
BOOST_CLASS_EXPORT_GUID( SpeedStruct, "SpeedStruct" );
and the speed struct is just a simple struct with 3 double values of X,Y and Z.
MY question is I read the FAQs and there is indication of various ways
to speed up the process, but I am unclear of how to implement it in my
code , specifically how to use BOOST_IS_BITWISE_SERIALIZABLE and also
removing tracking and versioning.
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