refactor: drop property_tree dependency - #547
Conversation
|
Boost dependency footprint vs Header-inclusion weights (graph files pulling each direct dependency in):
Transitive Boost modules: 68 → 67 (-1)
|
|
Compiler-warning counts vs
|
dd803bf to
8d16ad5
Compare
8d16ad5 to
520413c
Compare
520413c to
16aca6d
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #547 +/- ##
===========================================
- Coverage 92.45% 91.60% -0.85%
===========================================
Files 392 393 +1
Lines 28214 28824 +610
Branches 8008 8124 +116
===========================================
+ Hits 26086 26405 +319
- Misses 2024 2311 +287
- Partials 104 108 +4
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Before submitting
developbranch.Type of change
Does this PR introduce a breaking change?
What this PR does
Motivation
property_tree's value is a uniform generic tree with a string-path query API, the same interface we would use for JSON or INI. But GraphML never needs that generality: it only ever asks "tag name? this attribute? this text?", which a rapidxml node answers directly.
Under the hood, property_tree already parses XML with rapidxml (nodes are non owning, pointers to buffer), then copies the entire parse result into its generic ptree so the uniform API works (pure overhead with many allocations as nodes are recursive pairs
string/ptree).This PR keeps the exact same rapidxml parser but walks its DOM directly, deleting the ptree copy (and with it the property_tree dependency).
Testing
The legacy tests properly exercise the round trip and code path to guarantee no regression. The only legacy behavior we can't match is the exception type being raised. Malformed XML now throws
boost::parse_errorinstead of property_tree'sxml_parser_error/ptree_bad_pathBenchmark script to compile and run on develop then on the PR branch:
On develop:
On PR:
Checklist
b2in thetest/directory).