scratchfoundation / scratchfoundation/scratch-blocks
Investigate field caching
@rachel-fenichel is already working on this.
Since Jul 12, 2017.
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 1.6k
- Avg merge
- 4h 51m
- Merged PRs (30d)
- 12
Description
Tracking issue for exploration/discussion of performance problems around text length caching.
This is also a performance issue in upstream blockly.
Expected Behavior
Measuring text labels on blocks should not take a long time, since so many of them are duplicated.
Actual Behavior
There is a field cache that stores widths of text, but it's cleared between render passes.
Steps to Reproduce
Opening large projects hammers this problem (though other things contribute as well).
Operating System and Browser
All, but IE10 is a particular concern because it has worse behaviour for getComputedTextLength.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.