Files
vectorcraft/crates
dotCooCoo 7142cca3e9 .ai save: parse each art style text once per save
Saving a .ai file checks every art style it writes by reading it back
with the reader's style parser. Each object check parsed its style text
twice (once to read the appearance and once for the outline check), a
brushed style a third time, and a linked object first searched every
written style by name and copied its text. With thousands of objects
on a few styles, the same text was parsed tens of thousands of times.

The writer now keeps each style text's parse for the whole save, a
text the reader does not parse included, and reads it on each object:
the object's own gradient, the outline check, the brush check and the
appearance comparison still run per object. The own gradient is applied
to a copy of the parse, and that copy is the compared appearance; the
outline and brush checks read the kept parse.
Panel styles are found by their place in the written list. The output
is unchanged.

- import: parse_art_style, read_parsed_style and parsed_moves_with
  split the parse from the reading; BrushesRead::style_reads takes the
  parse.
- Tests: the parse count of a save does not grow with the number of
  objects on the same styles; the program, header, warnings and private
  data are the same as with a parse at every check; one parse read on
  two objects gives each its own gradient. An ignored test times the
  save of 40 graphic styles, 20,000 linked rectangles and 5,000 paths
  with their own Outer Glow.
2026-11-17 13:52:24 -08:00
..
…
…
…
…