mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-30 18:25:34 +01:00
Hit walks measure every path's culling box with PathData::control_bounds, which read every anchor of the path on every call. Since anchors are kept in shared chunks, that read follows two more pointers per path and goes through the chunked iterator, so each node of a hover or cursor walk cost about twice what it did before the chunks. Each subpath's anchor list now keeps the box round its points and handles once it is measured (Anchors::control_bounds), and every change to the list clears it. A copy of the list keeps the box too. control_bounds unions the subpaths' boxes, with the same result as before. - anchors.rs: control_bounds reads the anchors once until they change, counted by measured_control_anchors; each change to the list clears it. - Tests count the anchors read: a list reads them once across calls and copies, again after each kind of change, and a hover past 100 squares reads none after the first.