Reuse unchanged projection arrays and limit extra viewport retention

This commit is contained in:
2026-11-09 18:45:57 +08:00
parent 0813b8df53
commit a9bc6e7d29
7 changed files with 39 additions and 9 deletions
+15
View File
@@ -408,3 +408,18 @@ While a control owns an active capture, foreign pointer events reaching that
control are consumed without changing the lease; they do not fall through into
pane navigation/connection handlers. Outside an active control, unclaimed input
continues normally. Node drag cancellation only addresses its own pointer/token.
The view projection cache now retains node/edge array identities when all retained
items and their order are unchanged, so metadata-only roots do not hand React Flow
new collections. A changed node replaces its node array while an unchanged edge
array remains stable. Document and transform provenance still come from the fresh
projection; lifecycle/scope changes and `clear()` invalidate the retained arrays.
Projection calculation still scans the scene. This is not selective mounting or
complete dirty-region rendering.
Additional node/overlay retention now checks whether the target is already kept
by native rectangle visibility (including initial measurement/dragging). A toolbar
on an already visible node no longer disables culling for every other node. Only
an otherwise offscreen target that needs extra paint/overlay retention uses the
view fallback. Focus/IME and gesture safeguards remain. This fixes a measured
regression where selecting a frame mounted all 2003 nodes after a large copy.