penpot/frontend
Luke Lau a224608a0e
⚡ Memoize boards with grids in frame-grid* (#13075)
On a test file `mem_benchmark` with 30k boards on one page, around 11ms is
spent each time the view is panned/zoomed iterating over each board and
checking has-grid?, which after https://github.com/penpot/penpot/pull/12790 is
now slightly slower because it involves an array scan.

We don't need to compute the list of boards with grids on every step of the pan
and can memoize it, which saves 30k calls to has-grid? on each frame.

AI-assisted-by: claude-opus-5-5
2026-11-16 14:32:10 +01:00
..
2026-04-07 21:35:00 +02:00
2026-11-12 11:02:34 +01:00
2026-10-07 10:41:29 +02:00