boostorg / property_tree

Boost.org property_tree module
http://boost.org/libs/property_tree
55 stars 92 forks source link

boost::property_tree::read_json takes a long time #105

Open WuDaWeiCTO opened 1 year ago

WuDaWeiCTO commented 1 year ago

boost1.56.0 boost::property_tree::read_json takes a long time 16ms, and occasionally takes a short time 0ms

ashtum commented 10 months ago

@WuDaWeiCTO, could you please provide more context for this? It could be an OS issue if you're attempting to read a JSON file from disk. Do you have a reproducible example code?

nvkhoi112358 commented 3 months ago

I think boost add explicit Json since 1.75.0 https://www.boost.org/doc/libs/1_75_0/libs/json/doc/html/index.html In my case, it is 4x faster.

JSON parser through ptree is a very bad idea.