mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-18 13:33:51 +00:00
A Stroke panel edit with no item lists the selected groups and layers that have a stroke of their own, then adds the leaves of the other targets, and it checked each leaf against the growing list, so collecting the targets took time that grows with the square of the object count. The command now checks each leaf against a set seeded with the listed groups and layers. The list is the same: its order is kept, a group or layer named twice is still listed twice, and a leaf is listed once. crates/engine/examples/stroke_targets_bench.rs times both merges on the same leaves in one process. With 20,000 paths in one group, collecting the targets takes 0.66 ms of thread CPU time against 55 ms with the list search, and the whole command takes 60 ms.