mirror of
https://github.com/penpot/penpot.git
synced 2026-11-16 15:11:17 +00:00
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