I have found that boost::property_tree::ptree has an enormous memory overhead. My estimate is that an empty ptree is about 150 bytes, and, any entry put in a ptree adds at least another 150 bytes. This makes it unusable for us for trees containing thousands of entries.
Is my estimation off? Is there some way to keep the overhead low?
Boost.PropertyTree is basically not a fast or lightweight parser.
It focuses on providing high layer convenience and functionalities, so it is not built to be efficient, I guess.
You could see this thread on boost mailing list for a similar question.
I'd suggest that an alternative of Boost.PropertyTree might be either:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With