googleapis / googleapis/google-cloud-rust
Optimize deserialization
- Dominant language
- Rust
- Stars
- 955
- Forks
- 144
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 279
Description
As @fornwall notes:
> The generated deserializers track duplicate fields with a `HashSet`, which hashes each insertion and allocates storage as fields are recorded.
This could be avoided with a bitset: each field could get a known index between 0 and N, and N is known at compile time.
I am opening this issue so we can discuss ideas, tradeoffs, and quantify the wins.
Contributor guide
Research direction
Start by reviewing the generated deserializers and how their HashSet tracks duplicate fields. Compare the proposed compile-time field indexes and bitset approach, then quantify the tradeoffs and performance wins. The issue does not yet define a specific implementation or completion criteria, so those need agreement before work begins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100