Commit Graph
3 Commits
Author SHA1 Message Date
PanosandClaude Opus 5 69bd3c40a9 perf: stop scanning every entity for associative centers on each edit
The spans put it exactly: 63.5 ms of a 63.8 ms pointer-up is
`bump_entities`, and inside it two drawing-wide scans.

`refresh_associative_centerlines` and `refresh_associative_center_marks`
each walk all 1 166 357 entities, filter to Lines and parse every one's
extended data looking for an association that references a changed
handle. About 30 ms each, run on every edit -- to find, on this drawing,
none at all.

Track whether the document holds any such association. The question is
settled once, with a single pass, and after that each edit only examines
the handles it actually changed: an entity that carries an association
flips the answer to yes, and nothing else can. Deleting the last one
leaves the answer at yes, which costs a scan that finds nothing rather
than skipping one it should have run. A coarse `bump_geometry` re-opens
the question, since it can carry a new document.

Where an association really exists the scans run exactly as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-05 09:10:49 +03:00
Hakan Seven b648000e78 Merge pull request #850 from ramox81/codex/associative-center-mark 2026-08-21 20:19:54 +03:00
ramox81 ff09fc7800 Implement associative center mark workflow 2026-08-21 12:05:18 +03:00