We needed serialization of quite large C++ class hierarchy with lots of inheritance, contraction, shared pointers, etc. I decided to use boost::serialization
library.
My problem is that while compilation of this library on VS 2008 cl
takes over 1 GB of RAM memory. I suppose this is caused by template-based serialization in Boost. This causes many problems with building whole project on weaker PCs. What's interesting, compilation time is not so much longer:
no serialization: 15:38 [mm:ss]
serialization: 17:06 [mm:ss]
My question is: is it possible to cut the memory usage? Maybe with longer compilation time?
Edit
This increase of used memory happens in several files during compilation of C++/CLI project which actually uses serialization from the library above. Without serialization cl.exe
has peak memory on the largest file about 150 MB, usually not more than 80. Increase of memory use is about 4 to 8 times on several files.