-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
component: performanceissue: feature requestDescribes a new feature and why it should be addedDescribes a new feature and why it should be added
Milestone
Description
Is your feature request related to a problem? Please describe.
The field cache stores the computed text length for SVG strings. We turn it on and off regularly, which means that we are missing some of the benefits of caching.
Describe the solution you'd like
- Turn the field cache on when injecting
- Add a limit to the size of the field cache and/or periodically trim the cache to make sure it doesn't get out of control.
Describe alternatives you've considered
- Turn the cache on at the beginning of major operations like loading workspaces (we may already do this)
Additional context
Scratch team did this a while back. Blockly then ate all of the available memory because it was unbounded, but that should be a simple fix
This is especially effective if there are lots of copies with the same text.
A shockingly large amount of our rendering time goes to measuring text.
Metadata
Metadata
Assignees
Labels
component: performanceissue: feature requestDescribes a new feature and why it should be addedDescribes a new feature and why it should be added