Repository navigation
feat!: optimize large graph rendering for 500-node flows - #39
Merged
Merged
Conversation
Add incremental graph indexing, adaptive overview rendering, isolated paint layers, cached minimap geometry, and a 500-node profile benchmark. BREAKING CHANGE: controller collections are now read-only, mutable observable collection getters are removed, connection label builders preserve their data type, and adaptive LOD is enabled by default.
- vyuh_node_flow@0.28.0
Separate live camera updates from committed reactive viewport state, render immutable connection snapshots with packed overview batches, coarsen low-zoom grids, and elide idle full-canvas layers. Add a deterministic 100-frame profile harness for pan, zoom, drag, and node/edge topology churn. BREAKING CHANGE: high-frequency viewport rendering now uses live camera state while viewportObservable represents committed interaction state; GridTheme adaptively coarsens low-zoom spacing by default.
- vyuh_node_flow@0.29.0
- vyuh_node_flow@0.30.0
Contributor
Author
|
Architecture follow-up pushed in Key changes:
100-frame Chrome 151 release/Wasm, 500 nodes / 955 edges:
Native macOS profile adaptive topology churn is 5.916 ms p50 / 6.326 ms p95 with zero misses. Full package: 6,911 tests passed; package and demo analysis clean. |
- vyuh_node_flow@0.31.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Reworks Vyuh Node Flow's large-graph rendering path around a retained, adaptive scene. The editor keeps rich Flutter widgets where interaction needs them and uses batched painting for the rest of the graph.
The target fixture is 500 nodes and 955 connections at a 120 Hz frame budget (8.33 ms).
User-visible result
Architecture changes
Node scene
widgets,navigation, andoverviewscene modes.Observerboundaries so cursor and resize state do not rebuild complete node subtrees.thumbnailCacheKeyfor retained thumbnail invalidation and content-faithful custom painting.Connection scene
CustomPainter.paint.shouldRepaintan O(1) stable-revision comparison.Camera, spatial index, and mutations
mutateGraph(...)as the synchronous graph transaction boundary.API and maintainability
mutateNodeData(...)for controller-mediated mutable data changes.dynamic.nodesBoundsas a reactive computed value.Breaking changes
nodesObservable,connectionsObservable,selectedNodeIdsObservable, andselectedConnectionIdsObservableare removed.nodes,connections,selectedNodeIds, andselectedConnectionIdsare read-only live views; mutate through controller APIs.maxInteractiveNodes: 200. UseLodPlugin(enabled: false)for an always-widget scene.viewportis the live camera, while committed reactive state and per-frame camera rendering have separate signals.GridThemeadaptively coarsens spacing;minScreenSpacingdefaults to 24 logical pixels.dynamic.Performance evidence
Deterministic fixture: 500 nodes, 955 edges, 100 warmup frames, and 100 measured frames per workload. Timings are hardware-specific and should be reproduced on target devices.
macOS profile — adaptive scene
Chrome release + Wasm — adaptive scene
The web topology workload is the remaining measured path above the 120 Hz budget. Pan, zoom, and drag are within budget in the recorded adaptive run.
The benchmark emits structured JSON with p50/p95/p99/max UI, raster, and total spans; frame-budget misses; delivered-frame counts; workload counters; renderer metadata; and effective LOD state.
Validation
flutter analyze packages/vyuh_node_flow— cleanflutter analyze packages/demo— cleanvyuh_node_flowsuite — 6,915 tests passedgit diff --check— cleanRelease
vyuh_node_flow 0.31.0vyuh_node_flow-v0.31.08092, leaving an existing application onlocalhost:8080untouched.