Consider caching Bytes to byte[] when creating mutations
- Dominant language
- Java
- Stars
- 200
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
While working on #804 I realized that in some cases caching Bytes to byte[] conversion would probably be faster than always allocating new byte array in some situations. This is mainly when there is small set of columns(or a small set of families or qualifiers). When all of the columns are unique, trying to cache could hurt performance. So the code would need to adapt to this situation and possible stop using the cache when the hit rate is low.
[Flutation line 52](https://github.com/apache/incubator-fluo/blob/c896fc16bb6ab0af4df9e26554516a70c1ffa302/modules/core/src/main/java/org/apache/fluo/core/util/Flutation.java#L52) is the code where this optimization could be made.
Contributor guide
Research direction
Start in modules/core/src/main/java/org/apache/fluo/core/util/Flutation.java at line 52, and review issue #804 for the surrounding mutation-creation context. Define how caching should adapt to repeated versus unique columns, families, or qualifiers, then validate that the cache improves the relevant allocation and performance cases without harming low-hit-rate cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100