Boost logo

Boost Users :

From: Elizabeta Petreska (elizabeta.petreska_at_[hidden])
Date: 2021-07-14 12:29:44

I upgraded my project to use boost 1.74 instead of boost 1.49. After the
upgrade serialization time for my project archive is extremely slow. With
boost 1.49 my project archive was serialized about 1 to 2 minutes. With
boost 1.74 it takes more than 50 minutes (I stopped the process so I do not
know the exact time it takes) to do the serialization. I am experiencing
this only when doing xml serialization. Binary serialization is good, maybe
just one second difference between 1.49 and 1.74.
What could be the problem with xml serialization ?
Repeatedly stopping and playing the debugger gets me into this function in
the call stack: save_start i.e in save(*) where it saves the name of the
attribute in the xml archive. and then in save_iterator.

basic_xml_oarchive<Archive>::save_start(const char *name)
    if(NULL == name)

    // be sure name has no invalid characters
    std::for_each(name, name + std::strlen(name), detail::XML_name<const

    if(depth > 0){
    this->This()->save(name); (*)
    pending_preamble = true;
    indent_next = false;

And then save(name) calls this function
template<class InputIterator>
void save_iterator(std::wostream &os, InputIterator begin, InputIterator
    typedef iterators::wchar_from_mb<
> xmbtows;

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at