This is an english version translated by chatGPT.
Summary
Would you consider releasing rstar v0.12.3 with a backport of the
RTree::bulk_load excessive memory retention fix from #220?
The fix is already included in v0.13.0, but upgrading to 0.13 also
requires adopting its breaking API changes. A 0.12.x patch release would
allow downstream users to receive this bug fix independently.
Relevant links:
Motivation
This is a substantial memory-retention bug rather than a new feature.
The bulk_load implementation in 0.12.2 uses Vec::split_off while
partitioning elements into slabs. The retained capacity can propagate into
leaf-node child vectors through Rust's in-place collect optimization.
In an OSM-based routing workload, we measured the following after bulk-loading
a regional spatial index:
- Logical R-tree node storage: approximately 169 MB
- Actual child-vector allocations: approximately 1.80 GB
- Allocation overhead: approximately 1.63 GB, or about 90%
- Rebuilding the same tree through a compact clone reduced it to approximately
164 MB without changing query results
The effect becomes much larger for country-scale OSM datasets.
Downstream compatibility
Several downstream geospatial crates currently use rstar 0.12. For example,
the latest published geo 0.33.1 still depends on rstar ^0.12.0.
Support for rstar 0.13 has been merged into the geo repository, but it has
not yet been included in a crates.io release:
georust/geo#1536
This means downstream applications currently have to choose between:
- retaining the excessive memory usage;
- rebuilding or cloning the tree after bulk loading;
- patching/forking
rstar 0.12; or
- adopting unreleased or breaking dependency upgrades.
Requested scope
If maintainers are open to a 0.12.3 release, the requested scope would be:
The fix appears isolated to the bulk-load implementation and should not require
public API changes.
I can help validate the backport against the OSM routing workload described
above if useful.
Summary
Would you consider releasing
rstar v0.12.3with a backport of theRTree::bulk_loadexcessive memory retention fix from #220?The fix is already included in
v0.13.0, but upgrading to0.13alsorequires adopting its breaking API changes. A
0.12.xpatch release wouldallow downstream users to receive this bug fix independently.
Relevant links:
Motivation
This is a substantial memory-retention bug rather than a new feature.
The
bulk_loadimplementation in0.12.2usesVec::split_offwhilepartitioning elements into slabs. The retained capacity can propagate into
leaf-node child vectors through Rust's in-place
collectoptimization.In an OSM-based routing workload, we measured the following after bulk-loading
a regional spatial index:
164 MB without changing query results
The effect becomes much larger for country-scale OSM datasets.
Downstream compatibility
Several downstream geospatial crates currently use
rstar 0.12. For example,the latest published
geo 0.33.1still depends onrstar ^0.12.0.Support for
rstar 0.13has been merged into thegeorepository, but it hasnot yet been included in a crates.io release:
georust/geo#1536
This means downstream applications currently have to choose between:
rstar 0.12; orRequested scope
If maintainers are open to a
0.12.3release, the requested scope would be:v0.12.2;0.13;v0.12.3.The fix appears isolated to the bulk-load implementation and should not require
public API changes.
I can help validate the backport against the OSM routing workload described
above if useful.