Reputation: 355
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?
Upvotes: 7
Views: 1719
Reputation: 682
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:
Upvotes: 2