Closed mleralec closed 2 years ago
Following this issue https://github.com/gregberge/xstyled/issues/371, use a Map instead of a WeakMap for caches (with a theme stringifed as key instead of theme object). This will prevent continued cache growth.
Map
WeakMap
Check https://github.com/gregberge/xstyled/issues/371#issuecomment-1218335972
@jguddas Thanks for you comment, I'll close this PR. This fix looks very slow...
Summary
Following this issue https://github.com/gregberge/xstyled/issues/371, use a
Map
instead of aWeakMap
for caches (with a theme stringifed as key instead of theme object). This will prevent continued cache growth.Test plan
Check https://github.com/gregberge/xstyled/issues/371#issuecomment-1218335972