hiero-ledger / hiero-ledger/hiero-consensus-node
Consider adding a cache for `toBytes` results in PBJ
- Dominant language
- Java
- Stars
- 406
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
This ticket is inspired by @jasperpotts [comment](https://github.com/hiero-ledger/hiero-consensus-node/pull/17069#discussion_r2167833851):
```
The increased use of toBytes() on PBJ objects makes me wonder if we should consider lazy caching of results in PBJ like we do with hashCode and protobuf measure.
```
This indeed may give us some performance gain. We should consider this idea
Contributor guide
Research direction
No files or tests are named. Start by locating PBJ's toBytes implementation and reviewing how hashCode and protobuf measure are cached; measure the current conversion cost and usage patterns. Done means the caching approach and its performance impact are evaluated and documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100