mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-02 06:17:22 -06:00
With a 3,593-layer PSD open, an open menu rebuilt its 809 items every frame in about 700 ms. Each item's enabled/checked state looks up the active layer several times, and Document::layer built the whole layer list (one allocated path per layer) for every lookup. - Document::layer and path_of search the tree directly: 265 us -> 23 us per lookup on that file, 700 ms -> 87 ms per menu build. - An open menu reuses its items between frames, rebuilding when the native menu's state hash changes or on a click or key press. The hash now also covers a running background job. Claude-Session: https://claude.ai/code/session_01TABvQWhsoDmc14uLCnkBJJ Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>