Files
vectorcraft/crates
dotCooCoo a187449f7c Legacy .ai: gradient and spot color names are numbered with a set and a counter per name
Saving a legacy .ai file numbered a gradient definition whose name was
taken by searching every definition written so far for each number it
tried, so a document with many distinct gradients without a swatch name
spent time cubic in their count naming them. Spot color names were
numbered the same way.

Both now keep the names given in a set and, for each name, the number to
try next. Names are never given back, so every number below that counter
is still taken, and the file is the same as before: the first free
"Name 2", "Name 3" and so on, with equal gradients sharing a definition.

- New tests compare the counters with a search of the names given over
  3,000 names, and the whole written file both ways for colliding
  gradient and spot color names.
- An ignored timing test writes 1,504 gradient definitions: in release on
  Linux, the median of 7 runs took 23 ms of thread CPU time against
  1,163 ms for the search.
2026-11-16 08:02:35 -08:00
..
…