Files
vectorcraft/crates/render
dotCooCoo a5493a1cd0 Paths: editing one anchor of a long path keeps one chunk of anchors for undo
A subpath's anchors are now an `Anchors` list held in chunks of up to
256 anchors behind `Arc`s. Copying a path copies the chunk table and
shares the chunks, and editing one anchor copies only the chunk that
holds it, so the undo step of a one-anchor edit no longer keeps a copy
of every anchor of the path. Inserting or removing an anchor copies the
chunk it is in and rebuilds the table. Reads and edits follow the Vec
and slice methods the code used; files write and read each subpath's
anchors as one list, as before, within the same anchor read budget.

The undo memory estimate counts only the chunks the other version of
the path does not hold, and the renderer's kept paths compare only the
chunks an edit copied when they look for moved anchors.

Moving one anchor of an open path of 10,000 or 200,000 anchors
(path.moveAnchor, path.setHandle, path.moveAnchors, a nudge) keeps at
most 48 KiB in its undo and redo steps, where it kept 56 bytes per
anchor.
2026-11-14 21:25:15 -08:00
..