tldraw/packages/state
David Sheldrick 741ed00bda
[signia] Smart dirty checking of active computeds (#3516)
This is a huge perf win, and it came to me while procrastinating on
making dinner.

The idea is that we can skip checking the parents of a computed value if

- it is being dereferenced during a reaction cycle
- the computed value was not traversed during the current reaction cycle

This more than doubles the speed of the webgl minimap render on my
machine (from 2ms down to like 0.8ms).

This will make the biggest difference for anything that derives a value
from a large collection of other computed values where typically only a
small amount of them change at one time (e.g. iterating over all the
shape page bounds to compile an RBush)

Most code paths where we see a big chunk of `haveParentsChanged` in
flame graphs should be much faster after this.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `improvement` — Improving existing features
2024-04-18 07:57:37 +00:00
..
api New migrations again (#3220) 2024-04-15 12:53:42 +00:00
src [signia] Smart dirty checking of active computeds (#3516) 2024-04-18 07:57:37 +00:00
api-extractor.json Incorporate signia as @tldraw/state (#1620) 2023-06-20 13:31:26 +00:00
api-report.md [perf] faster signia capture (again) (#3487) 2024-04-16 11:12:01 +00:00
CHANGELOG.md Update CHANGELOG.md [skip ci] 2024-02-29 16:41:45 +00:00
docs-ordering.json Unbiome (#2776) 2024-02-07 16:02:22 +00:00
LICENSE.md unbrivate, dot com in (#2475) 2024-01-16 14:38:05 +00:00
package.json Revert perf changes (#3217) 2024-03-21 10:05:44 +00:00
README.md Incorporate signia as @tldraw/state (#1620) 2023-06-20 13:31:26 +00:00
tsconfig.json Revert perf changes (#3217) 2024-03-21 10:05:44 +00:00

@tldraw/state

...