Boost logo

Boost Users :

Subject: [Boost-users] How to improve property_tree performance
From: Bo Jensen (jensen.bo_at_[hidden])
Date: 2010-10-13 03:35:00


Hi,
I have a fairly easy record structure which I am writing to xml using
property_tree. I am trying to figure out how to do it better, since
the current time spend building the tree is too high.

I do the following :

    wiptree pt;
    wiptree &tvars = pt.add(L"some.recordname",L"");

    for( int i = 0; i < somenumber /*say 60K*/; ++i )
    {
      wiptree &curtree = tvars.add(L"someitem",L"");

      curtree.add(L"<xmlattr>.name",L"some_attribute");

      ...
    }

To me this seems reasonable. Is there a faster way to do this ? Since
I just want to write it out and it's quite simple, I could avoid using
property_tree and write the xml file manually. But since I read it in
later with property_tree, then for maintainability I would like to
read and write with the same method.

Thanks
Bo


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