scratchfoundation / scratchfoundation/scratch-blocks

Investigate field caching

Open
#1,004 5 comments 0 reactions 1 assignee View on GitHub

@rachel-fenichel is already working on this.

Since Jul 12, 2017.

performance upstream
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.