Files
vectorcraft/crates/engine
dotCooCoo 07bccb19a7 Swatches: New Color Group, Delete, Move and Merge take named swatches in one pass
New Color Group looked up and removed each named swatch with a scan of
every swatch list, so making a group from artwork linked to many global
swatches took time quadratic in their number. Delete Swatch, Move and
Merge did the same, and checked each paint's link against the name
list.

take_swatches now finds every named swatch in one pass and removes them
together, in the order and with the same choice of swatch as removing
them one at a time. The commands look names up in one name map and
check links against sets.

With 16,000 named swatches in a release build, New Color Group went from
175.9 ms to 16.3 ms; 4,000 went from 11.6 ms to 3.6 ms.
2026-11-11 14:36:41 -08:00
..
2026-11-09 23:43:37 -08:00