mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-17 10:46:46 +00:00
Direction Handles cleared the selection and then added each path on its own, and each add searched the paths already selected, so building the selection took time that grows with the square of the path count. The command now selects the paths with one Selection::set call and adds the anchor sets in one extend. The selection is the same: paths keep their order, a repeated path keeps its first place and its last anchor set, and the side fields are cleared as before. crates/engine/examples/direction_handles_bench.rs times both ways on the same paths in one process. With 20,000 four-anchor paths, building the selection takes 1.9 ms of thread CPU time against 69 ms one path at a time.