mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 08:52:26 +00:00
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.