mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-25 10:17:02 -06:00
Export::class() deduplicated declaration blocks with classes.iter().position(), an O(n) scan per style, making exports with many distinct styles (e.g. large palettes) quadratic overall. Track the 1-based class number per declaration in a HashMap alongside the first-use-ordered Vec, so each lookup is O(1) while output stays byte-identical. Also adds a regression test covering 256 distinct declarations with recurrence of early styles, for both InternalCss and StyleEntities styling.