Files
vectorcraft/crates/engine
dotCooCoo 7a09189a88 Menus: panel menu states skip three selection walks on each rebuild
The menus rebuild every panel menu's states on each edit and selection
change. With 10,000 objects selected, three of those menus walked the
whole selection for values they did not use or had already read:

- Make Opacity Mask's check sorted the selection into paint order for
  its outermost objects before testing whether the selection has one
  subject root, and it is enabled without that sort for any other
  count. The check now sorts only for one root and no target.
- The Transparency menu built the panel's full values (opacity, blend
  mode, isolation and knockout compared across the selection) to read
  its first target. It now reads that target alone
  (`Session::transparency_target`), and checks Make Opacity Mask only
  when that object has no mask, the only case whose rows show it.
- The Color and Color Wheel menus asked the session whether the fill
  and stroke differ, once in the Color menu and twice in the Color
  Wheel menu. They now read the proxies' per-revision cache, which the
  Tools panel's proxies fill on the same revision.

On a test document of 10,000 rectangles, all selected, one pass over
the panel menus' states took 24 to 31 ms before and 16.5 to 17 ms after
(release build, four passes each).
2026-11-29 12:32:19 -08:00
..
2026-11-29 08:29:24 +05:30