Deallocating large BTreeMap takes very long time
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
When deallocating large BTreeMap takes very long time. Deallocating a BTreeMap with 15GB size with 60M elements(each element is 250 byte) takes around 20 seconds on my computer.
In my plogram, when code is exiting, that deallocating occures and takes long time. But in that case, deallocating is not needed because just freeing all allocated memory pages by os is enough.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name a source file, test, or entry point. Start by reproducing the reported BTreeMap deallocation case with a 15GB map containing 60M 250-byte elements, then investigate process-exit cleanup behavior. Done means the reported exit-time delay is addressed without compromising normal BTreeMap deallocation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100