Skip to content

Conversation

marvinhagemeister
Copy link
Member

@marvinhagemeister marvinhagemeister commented Mar 11, 2021

This reverts commit f5bae9e.

Because we cannot forsee the length and amount of strings we need to be more careful about keeping them around as memory consumption can grow unbounded. In the future we should check if we can use a limited cache, only cache attributes or something else. WeakMaps unfortunately won't help as they cannot be used with primitives as cache key.

Got notified privately that a production site ran into a memory leak and we definitely don't want that. Let this be a lesson for myself to be sceptical of memoization, despite it being an easy way to improve benchmark scores!

This reverts commit f5bae9e.

Because we cannot forsee the length and amount of strings we need to
be more careful about keeping them around as memory consumption
can grow unbounded. In the future we should check if we can use
a limited cache, only cache attributes or something else. WeakMaps
unfortunately won't help as they cannot be used with primitives as
cache key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant