matrix-org / matrix-org/matrix-rust-sdk
Use hashbrown directly for more efficient map lookups?
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 500
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 106
Description
Due to `hashbrown` (which is what `std`s `HashMap` is based on) having more lax constraints regarding the key to look up items by, we could save allocations that currently arise from having to wrap an event ID or transaction ID in `EventItemIdentifier`.
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
Search the repository for EventItemIdentifier and the maps keyed by event IDs or transaction IDs. Read those lookup paths alongside hashbrown's key-lookup constraints, then run the relevant existing tests; done means the lookups avoid unnecessary identifier-wrapping allocations without changing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100