What problem does this feature solve?
String size caching (implemented in DOMUtils.ts) is currently global for Recharts and has a maximum of 2000 keys. Plus, when it is over 2000 keys, it is purged completely.
This is an umbrella issue for possible improvements to the caching mechanism. Some ideas:
- Scope the string size cache by chart: this should reduce cache misses when all charts rendered on a page have over 2000 potential different string/style combinations at the cost of more memory
- Tweak the string size cache: maybe it should depend on the number of data points in a chart? Should it be configurable by an end user?
- Avoid purging the whole cache when over the 2000 keys and evict key on a FIFO basis
Feel free to provide more suggestions below.
More context can be found here.
What does the proposed API look like?
It may not require a new API. It depends on the paths that we want to take.
What problem does this feature solve?
String size caching (implemented in DOMUtils.ts) is currently global for Recharts and has a maximum of 2000 keys. Plus, when it is over 2000 keys, it is purged completely.
This is an umbrella issue for possible improvements to the caching mechanism. Some ideas:
Feel free to provide more suggestions below.
More context can be found here.
What does the proposed API look like?
It may not require a new API. It depends on the paths that we want to take.