Boost logo

Boost Users :

From: Andreas Sæbjørnsen (andreas.saebjoernsen_at_[hidden])
Date: 2008-07-10 00:06:00


We are a team that develops a C/C++/Fortran/Binary compiler project
called ROSE and we want to serialize the Abstract Syntax Tree (AST).
This AST has 436 different custom class types and uses maps, sets,
vectors, lists and hash maps. These classes have about 1229 different
variables. For convenience reasons we wanted to serialize the AST
using boost::serialize, but we have some compiler performance
problems. Currently the compilation takes (GCC 4.1.2)
     -48 minutes to compile and link a program that takes seconds to
compile without serialization
     -The resulting binary goes from <1MB to 122 MB in size.
     -The compilation uses 2 GB of RAM
     -The object file contains 98075 symbols with serialization and 41 without

If the templates for loading the AST is not instantiated the
instantiated templates for saving the AST takes about
     - 19 minutes to compile and link
     - The resulting binary goes from <1MB to 77MB
     - The compilation uses 1.1GB of RAM

We have our own custom serialization mechanism that is not that easy
to support, but it does not visibly increa

My machine is a 2.66 Ghz Quad Core Xeon 5355, 16 GB RAM and 2 TB of
striped storage.

Is there any trick I can use to reduce the compilation time? When the
compilation time is 48 minutes boost::serialization is unfortunately
not an option for us although it is a great tool at runtime.

thanks,
Andreas


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