Files
vectorcraft/docs
dotCooCoo 385b4c5e82 Cut: direct-selection Cut removes whole and emptied paths in one pass per parent
Cut with direct-selected anchors or segments removed each object selected
whole, and each path it left with no segment, with its own remove. Every
removal shifted the siblings after it, so later lookups walked the
document's tree again. With 2,000 roots removed whole, the old loop
walked the tree 10,005 times.

These removals now go through the same batch that already places the
surviving pieces, which rebuilds the children of each layer or group
once, and compound paths left with no members are removed after it. A
compound path left with one member stays a compound path. The document,
the selection, the clipboard and the undo step are the same as before.

With 2,000 of 10,000 squares on one layer selected whole and two anchors
of another picked, Cut walks the tree 8 times instead of 10,005 and
takes a median of 11 ms of CPU time instead of 573 ms (release build on
Linux, seven alternating runs in one process).
2026-11-17 17:49:21 -08:00
..
…