Skip to content

[EXPERIMENTAL — DO NOT MERGE] perf: make Vue nodes usable on large graphs - #15016

Closed
benjcooley wants to merge 10 commits into
mainfrom
benjcooley/virtualize-nodes-20-graph
Closed

benjcooley wants to merge 10 commits into
mainfrom
benjcooley/virtualize-nodes-20-graph

Conversation

@benjcooley

Copy link
Copy Markdown
Collaborator

EXPERIMENTAL — DO NOT MERGE. Opened as a draft for review of the approach
and the measurements. See "Suggested split" below: this should land as three
separate PRs, not as one.

Summary

Vue node rendering was unusable on large workflows — every node stayed mounted as a DOM component tree at all times, at every zoom — so a 3000-node graph panned at ~310ms/frame where the canvas renderer managed 27ms. Vue nodes now match or beat the pre-work canvas-renderer baseline in five of six measured configurations.

Changes

  • What: Viewport culling of Vue nodes, a version-cached spatial index for viewport queries, level-of-detail rendering that draws plain boxes to a renderer-owned canvas when zoomed out past legibility, and a fix for minimap change detection that re-derived the whole graph every frame.
  • Breaking: None intended. No public API or serialization changes.
  • Dependencies: None added.

Median frame time while panning. "litegraph" is the canvas renderer before this work, i.e. the bar to clear:

nodes zoom litegraph vue before vue after vs litegraph speedup
1000 0.6 10.1 ms 57.1 ms 12.0 ms 1.19x 4.8x
1000 min 25.1 ms 66.3 ms 20.7 ms 0.82x 3.2x
1000 fit 37.2 ms 81.4 ms 34.2 ms 0.92x 2.4x
3000 0.6 27.3 ms 310.5 ms 23.1 ms 0.85x 13.4x
3000 min 41.6 ms 280.5 ms 34.3 ms 0.82x 8.2x
3000 fit 126.5 ms 380.7 ms 104.0 ms 0.82x 3.7x

DOM elements on the 3000-node graph: 227,787 → 5,355 at working zoom, → 418 (application chrome only) when zoomed out.

Full write-up, method and follow-ups: docs/architecture/vue-nodes-large-graph-performance.md.

Suggested split

727 lines of non-test, non-doc source is well past the 300-line guideline. The commits are already separable and should become three PRs:

  1. Minimap (d67006644e) — independent, renderer-agnostic, and made the canvas renderer ~2x faster on its own.
  2. Culling (987c5b7532, d53cc46874, 43271d6e60, 8e11dd9520) — a stack; revert top-down.
  3. Level of detail (fcb96da734, c68cf7a8cd, 982c3ab751) — includes a revert of an approach that made the DOM renderer depend on litegraph to draw a zoomed-out graph; worth reading that revert message.

Review Focus

  • nodeCullingIndex deliberately does not reuse SpatialIndexManager. That index is built on a fixed ±10000 box and QuadTree.insert silently drops anything outside it — the return value is discarded and update() cannot recover an item never inserted. Real workflows outgrow it, so most nodes would be missing from query results. This index sizes its root to the graph's extent.
  • Culling unmounts; it never uses display: none. The shared ResizeObserver has no zero-size guard, so a hidden node writes 0x0 bounds through layoutStore into liteNode.size and corrupts the saved workflow.
  • The mounted set is not a reactive dependency of the camera. TransformPane writes its transform by direct DOM mutation specifically to avoid re-diffing every node each frame; camera state is sampled through a throttle instead.
  • useMinimapGraph now reads graph._nodes/graph.links directly for its digest, where it previously went through MinimapDataSourceFactory. That is more coupling, traded for dropping a per-frame JSON.stringify of every link.
  • LOD still reads min_font_size_for_lod off the canvas renderer, so both renderers switch at the same zoom. The node box drawing itself has no litegraph dependency.

Not done

  • renderLink rebuilds its render context per link, per frame (~15% of frame time at fit zoom). Shared link path, so it helps both renderers; the fix is hoisting the context out of the loop, not caching, since LGraphCanvas.link_type_colors is mutated in place by extensions.
  • Links are still drawn by drawConnections. Predates this work, and is the remaining obstacle to the DOM renderer standing alone.

Testing

Unit tests added for the culling composable, the culling index, the LOD threshold, and the box renderer. Verified manually against generated workflows of 1000/3000/8000 nodes: normal zoom unchanged, LOD transition round-trips with widgets/slots/links/error state intact, no page errors.

Note: this checkout has a pre-existing broken install (two @vue/runtime-core copies) that fails ~1694 tests. main fails identically, so it is environmental — the branch adds 23 passing tests and breaks none.

`getAllNodes()` rebuilds the full node layout map on every access, which
is wasteful for callers that only need a count, and unusable as a cache
key for callers that need to know whether geometry changed.

- `nodeCount` reports the tracked node count without materialising layouts.
- `layoutVersion` exposes the existing mutation counter for use as a cache
  key. Deliberately a plain number rather than a ref: consumers poll it to
  decide whether a derived structure is stale, and must not re-run
  reactively on every mutation.

Split out so the consumers that follow can be reverted independently.
The minimap re-derived the whole graph every animation frame. On a
3000-node workflow this dominated frame time; profiling a continuous pan
showed ~62% of samples in minimap work, more than the node DOM itself.

Four causes, all per-frame:

- `LayoutStoreDataSource.getNodes()` ran `_nodes.find()` inside a loop
  over every node, i.e. O(n^2) - ~9M comparisons per frame at 3000 nodes
  and ~64M at 8000. Use the graph's own id index instead.
- `checkForChangesInternal()` called `JSON.stringify(graph.links)` to
  detect rewires, serialising every link each frame. Replace with an
  allocation-free rolling digest over node geometry and link endpoints.
- A single render pass builds the data source several times (bounds,
  node rects, link endpoints). Memoise per instance; sources are already
  constructed per pass.
- Change detection ran on `useRafFn`. Structural edits already trigger a
  redraw via graph event hooks, so the loop only needs to catch drags and
  resizes, which emit no event. Poll at 100ms instead - the minimap is an
  approximate overview and need not track a drag frame by frame.

Digests can in principle collide and drop a single refresh; the next
change re-syncs, which is acceptable for an overview pane.
Adds a position query for "which nodes intersect this rect", backed by a
QuadTree that is rebuilt only when layoutVersion changes. Panning over a
static graph then costs a tree query rather than a scan of every node.

Deliberately does not reuse the shared SpatialIndexManager. That index is
built on QUADTREE_CONFIG.DEFAULT_BOUNDS, a fixed +/-10000 box, and
QuadTree.insert silently drops anything not fully contained (its return
value is discarded, and update() cannot recover an item that was never
inserted). Real workflows outgrow that box - a graph built by stamping
the default workflow across empty space spans tens of thousands of units
on each axis - so most nodes would be missing from query results. This
index sizes its root to the graph's own extent instead.

Nodes with no layout yet cannot be indexed, so they are reported by every
query; callers must mount them in order for them to measure themselves.

Unused until the next commit wires it up, so the two can be reverted
independently.
GraphCanvas rendered every node in the graph, so a large workflow paid
full DOM cost for nodes nobody could see. Filter the v-for down to nodes
intersecting an expanded viewport rect.

Measured on a graph built by stamping the default workflow across empty
space, panning at a working zoom:

  8000 nodes: 1790ms -> 133ms median frame, 606k -> 5.3k DOM elements
  3000 nodes:  272ms ->  49ms median frame

Design notes:

- The mounted set is derived from a throttled sample of the camera, not a
  reactive dependency on it. TransformPane deliberately writes its
  transform via direct DOM mutation to avoid re-diffing every node each
  frame; binding the node list to the camera would reintroduce exactly
  that cost.
- Nodes mount as soon as they enter and unmount after a delay, so nodes
  oscillating on the viewport edge do not thrash. Because that delay only
  elapses once panning stops, a long continuous pan would otherwise
  accumulate everything swept over; an eager prune bounds the set once it
  outgrows what is visible.
- Selected nodes are never culled, so unmounting cannot interrupt a drag
  or resize in progress.
- Culls by unmounting, never by `display: none`. The shared ResizeObserver
  has no zero-size guard, so a hidden node would write 0x0 bounds back
  through layoutStore into `liteNode.size` and corrupt the saved workflow.

Note this does not help when the whole graph is on screen. `min_scale` is
0.1, but loadGraphData's fit-view bypasses that clamp, so a freshly
loaded large workflow starts fully visible with nothing to cull.
The culling margin was a fraction of the viewport, which is screen-space,
so dividing it by the zoom made it cover more and more of the graph as the
user zoomed out. At minimum zoom it more than doubled the queried area and
mounted far more nodes than a pan could ever reach before the next
recompute - 2012 of 3003 nodes on a large graph.

Cap it at roughly five node widths, which is ample lead time at any zoom.
Working zoom is unaffected: the cap only binds once the ratio exceeds it,
which happens below roughly 0.35 zoom.

Panning a 3000-node graph at minimum zoom:

  141.2ms -> 78.7ms median frame, 2012 -> 910 nodes mounted

This does not help when the whole graph is already on screen; no margin
change can cull nodes that are genuinely in view.
Litegraph already stops drawing node detail once text would be too small
to read, falling back to plain filled rectangles and skipping text, badges
and shadows. Vue nodes rendered full DOM trees at every zoom, so a graph
opened zoomed out paid for thousands of complete component trees to draw
what amounts to coloured boxes.

Mirror litegraph's own threshold (min_font_size_for_lod, adjusted for DPR)
so both renderers simplify at exactly the same zoom and the existing
setting keeps working in either mode. Below it, each node renders as a
single positioned div instead of a component tree.

3000-node graph at its opening zoom: 227,787 -> 2,786 DOM elements.

Also releases the slot-sync wait while simplified. Link rendering waits
for nodes to report slot positions measured from the DOM; simplified nodes
have no slot elements, so on a graph large enough to open below the
threshold that measurement never arrived and links stayed hidden for as
long as the view stayed zoomed out. Links now fall back to positions
derived from node bounds, which is what the zoomed-out view wants anyway.
The previous commit rendered a positioned div per node while zoomed out
past legibility. That still cost an element per node - 3,003 of them on a
large graph - and profiling showed the browser spending most of a frame on
layout, paint and compositing for elements that amount to filled
rectangles.

Draw them on the canvas instead, which is what the renderer already does
for its own low-quality pass, and mount nothing. Vue nodes are only worth
their cost once their contents are legible.

Slot metrics are still computed for every node so hit-testing and link
endpoints stay correct; only the early return that skips painting moves.

3000-node graph at its opening zoom: 227,787 -> 417 DOM elements, the
latter being application chrome rather than nodes.
This reverts commit 93f7e4d.

Drawing the simplified nodes through litegraph's own node pass means the
Vue renderer cannot render a zoomed-out graph without litegraph present,
which is the opposite of the direction this renderer is heading. Links
already have the right shape - a Vue-owned canvas element with the drawing
itself living renderer-side in CanvasPathRenderer - so the simplified node
pass should follow that pattern instead.
The previous approach mounted a div per node while zoomed out past
legibility, which still cost an element per node - 3,003 of them on a
large graph - and profiling showed most of a frame going to layout, paint
and compositing for what amounts to filled rectangles.

Draw them onto a canvas instead. The drawing lives in nodeBoxRenderer,
which takes a 2D context and a set of bounds and has no graph or canvas
renderer dependencies, mirroring how CanvasPathRenderer already owns link
drawing. A zoomed-out graph therefore does not depend on the legacy canvas
renderer being present, which an earlier attempt at this did.

Node bounds come from the culling index, which already keeps them cached
against layoutVersion, so redrawing each frame rebuilds nothing.

3000-node graph at its opening zoom: 227,787 -> 418 DOM elements, the
remainder being application chrome rather than nodes.
Captures what was changed, what each change bought, how it was measured,
and what is deliberately left - including the constraints that shaped the
implementation, which are not obvious from the code alone.
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Thank you for your contribution, we really appreciate it! 🎉

Like many open source projects, we require contributors to sign our Contributor License Agreement (CLA). A CLA makes the ownership of contributions explicit, so contributors and the project share a clear understanding of how the code can be used. By signing, you:

  • Confirm that you own your contribution.
  • Keep the right to reuse your own code.
  • Grant us a copyright license to include and share it within our projects.

CLAs are standard practice across major open source projects including those under the Apache Software Foundation and the Linux Foundation. Ours is based on the Apache Software Foundation's CLA. Most importantly, it would enable us to relicense the project under a more permissive license in the future, giving the project and its community greater flexibility.

✍ To sign, please post a new comment on this PR with exactly the following text: ✍


I have read and agree to the Contributor License Agreement


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions

github-actions Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ❌ 1790 passed, 3 failed · 5 flaky

❌ Failed Tests

📊 Browser Reports
  • chromium: View Report (✅ 1769 / ❌ 3 / ⚠️ 5 / ⏭️ 5)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 08/10/2026, 11:07:04 PM UTC

Links

📦 Bundle: 8.7 MB gzip 🔴 +4.83 kB

Details

Summary

  • Raw size: 36.7 MB baseline 36.7 MB — 🔴 +13.3 kB
  • Gzip: 8.7 MB baseline 8.69 MB — 🔴 +4.83 kB
  • Brotli: 6.06 MB baseline 6.06 MB — 🔴 +3.46 kB
  • Bundles: 437 current • 437 baseline • 145 added / 145 removed

Category Glance
Graph Workspace 🔴 +12.3 kB (1.37 MB) · Data & Services 🔴 +1.02 kB (3.5 MB) · Vendor & Third-Party ⚪ 0 B (16.3 MB) · Other ⚪ 0 B (14 MB) · Panels & Settings ⚪ 0 B (565 kB) · Utilities & Hooks ⚪ 0 B (549 kB) · + 5 more

App Entry Points — 3.67 kB (baseline 3.67 kB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-0i27sFwV.js (removed) 3.67 kB — 🟢 -3.67 kB 🟢 -1.84 kB 🟢 -1.61 kB
assets/index-CcE8ni9s.js (new) — 3.67 kB 🔴 +3.67 kB 🔴 +1.84 kB 🔴 +1.61 kB

Status: 1 added / 1 removed

Graph Workspace — 1.37 MB (baseline 1.36 MB) • 🔴 +12.3 kB

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-yyo2NRW-.js (new) — 1.36 MB 🔴 +1.36 MB 🔴 +298 kB 🔴 +224 kB
assets/GraphView-I1Q7IAIn.js (removed) 1.35 MB — 🟢 -1.35 MB 🟢 -294 kB 🟢 -221 kB
assets/WidgetCompositor-DCEKbLS5.js (removed) 8.17 kB — 🟢 -8.17 kB 🟢 -2.75 kB 🟢 -2.45 kB
assets/WidgetCompositor-EC22jKJU.js (new) — 8.17 kB 🔴 +8.17 kB 🔴 +2.75 kB 🔴 +2.46 kB

Status: 2 added / 2 removed / 1 unchanged

Views & Navigation — 124 kB (baseline 124 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CloudSurveyView-B2N2z_eW.js (new) — 25 kB 🔴 +25 kB 🔴 +6.24 kB 🔴 +5.52 kB
assets/CloudSurveyView-D0Glkw9m.js (removed) 25 kB — 🟢 -25 kB 🟢 -6.24 kB 🟢 -5.52 kB
assets/CloudLayoutView-71h3xwuH.js (new) — 21.8 kB 🔴 +21.8 kB 🔴 +6.56 kB 🔴 +5.74 kB
assets/CloudLayoutView-DSj0zEgu.js (removed) 21.8 kB — 🟢 -21.8 kB 🟢 -6.56 kB 🟢 -5.77 kB
assets/UserCheckView-BIUvYyiz.js (removed) 8.75 kB — 🟢 -8.75 kB 🟢 -2.19 kB 🟢 -1.89 kB
assets/UserCheckView-DyumYDiq.js (new) — 8.75 kB 🔴 +8.75 kB 🔴 +2.19 kB 🔴 +1.9 kB
assets/CloudLoginView-BXihH3Pu.js (removed) 8.74 kB — 🟢 -8.74 kB 🟢 -2.55 kB 🟢 -2.27 kB
assets/CloudLoginView-CgeKNiS9.js (new) — 8.74 kB 🔴 +8.74 kB 🔴 +2.55 kB 🔴 +2.26 kB
assets/useCloudAuthPage-BrChHAFv.js (new) — 7.08 kB 🔴 +7.08 kB 🔴 +2.51 kB 🔴 +2.21 kB
assets/useCloudAuthPage-Cx7R4teX.js (removed) 7.08 kB — 🟢 -7.08 kB 🟢 -2.51 kB 🟢 -2.2 kB
assets/CloudSignupView-CZTgFUDm.js (removed) 6.56 kB — 🟢 -6.56 kB 🟢 -2.17 kB 🟢 -1.91 kB
assets/CloudSignupView-PPGQnRD6.js (new) — 6.56 kB 🔴 +6.56 kB 🔴 +2.17 kB 🔴 +1.9 kB
assets/WidgetTextPreview-B3ozRRU3.js (removed) 6.07 kB — 🟢 -6.07 kB 🟢 -2.12 kB 🟢 -1.88 kB
assets/WidgetTextPreview-CT7EL8SQ.js (new) — 6.07 kB 🔴 +6.07 kB 🔴 +2.13 kB 🔴 +1.88 kB
assets/CloudSubscriptionRedirectView-B4Ld_4_m.js (removed) 6.05 kB — 🟢 -6.05 kB 🟢 -2.25 kB 🟢 -1.96 kB
assets/CloudSubscriptionRedirectView-Ca6bfCDq.js (new) — 6.05 kB 🔴 +6.05 kB 🔴 +2.25 kB 🔴 +1.95 kB
assets/UserSelectView-DFHHVnwK.js (new) — 5.49 kB 🔴 +5.49 kB 🔴 +1.95 kB 🔴 +1.71 kB
assets/UserSelectView-pFZtqBJB.js (removed) 5.49 kB — 🟢 -5.49 kB 🟢 -1.95 kB 🟢 -1.71 kB
assets/CloudForgotPasswordView-DqaRFE_h.js (new) — 4.97 kB 🔴 +4.97 kB 🔴 +1.72 kB 🔴 +1.49 kB
assets/CloudForgotPasswordView-OjRbkML4.js (removed) 4.97 kB — 🟢 -4.97 kB 🟢 -1.72 kB 🟢 -1.49 kB
assets/CloudAuthTimeoutView-BdR51XMW.js (removed) 4.43 kB — 🟢 -4.43 kB 🟢 -1.54 kB 🟢 -1.34 kB
assets/CloudAuthTimeoutView-CwEZG5nY.js (new) — 4.43 kB 🔴 +4.43 kB 🔴 +1.54 kB 🔴 +1.34 kB
assets/OAuthLayoutView-Bg0HrlYa.js (new) — 1.31 kB 🔴 +1.31 kB 🔴 +698 B 🔴 +598 B
assets/OAuthLayoutView-CGJMmdNE.js (removed) 1.31 kB — 🟢 -1.31 kB 🟢 -700 B 🟢 -599 B
assets/WidgetTextPreview-Bq5DnazD.js (removed) 131 B — 🟢 -131 B 🟢 -100 B 🟢 -93 B
assets/WidgetTextPreview-DhOMmZMg.js (new) — 131 B 🔴 +131 B 🔴 +100 B 🔴 +88 B

Status: 13 added / 13 removed / 4 unchanged

Panels & Settings — 565 kB (baseline 565 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/KeybindingPanel-BGFPEXE3.js (removed) 49.4 kB — 🟢 -49.4 kB 🟢 -9.94 kB 🟢 -8.8 kB
assets/KeybindingPanel-C67154Ti.js (new) — 49.4 kB 🔴 +49.4 kB 🔴 +9.94 kB 🔴 +8.8 kB
assets/SecretsPanel-B6ufj1gT.js (removed) 33.7 kB — 🟢 -33.7 kB 🟢 -7.86 kB 🟢 -6.9 kB
assets/SecretsPanel-DAQVlQ22.js (new) — 33.7 kB 🔴 +33.7 kB 🔴 +7.86 kB 🔴 +6.9 kB
assets/CreditsPanel-DL-IPVaw.js (new) — 11.5 kB 🔴 +11.5 kB 🔴 +3.2 kB 🔴 +2.8 kB
assets/CreditsPanel-sLi4fnHH.js (removed) 11.5 kB — 🟢 -11.5 kB 🟢 -3.2 kB 🟢 -2.81 kB
assets/AboutPanel-DcuZJvvx.js (removed) 11.2 kB — 🟢 -11.2 kB 🟢 -3.02 kB 🟢 -2.72 kB
assets/AboutPanel-DDDpUm5a.js (new) — 11.2 kB 🔴 +11.2 kB 🔴 +3.02 kB 🔴 +2.72 kB
assets/ExtensionPanel-B5bri2uv.js (removed) 9.19 kB — 🟢 -9.19 kB 🟢 -2.51 kB 🟢 -2.23 kB
assets/ExtensionPanel-D2OOjYDI.js (new) — 9.19 kB 🔴 +9.19 kB 🔴 +2.51 kB 🔴 +2.22 kB
assets/ServerConfigPanel-BKCwqzjm.js (new) — 6.09 kB 🔴 +6.09 kB 🔴 +1.93 kB 🔴 +1.72 kB
assets/ServerConfigPanel-BwuXl5H0.js (removed) 6.09 kB — 🟢 -6.09 kB 🟢 -1.93 kB 🟢 -1.72 kB
assets/UserPanel-BWDpw_PG.js (new) — 5.73 kB 🔴 +5.73 kB 🔴 +1.78 kB 🔴 +1.54 kB
assets/UserPanel-CJoRkVC0.js (removed) 5.73 kB — 🟢 -5.73 kB 🟢 -1.78 kB 🟢 -1.54 kB
assets/refreshRemoteConfig-Dbkzb-bH.js (new) — 3.44 kB 🔴 +3.44 kB 🔴 +1.33 kB 🔴 +1.17 kB
assets/refreshRemoteConfig-f3Vh-qRq.js (removed) 3.44 kB — 🟢 -3.44 kB 🟢 -1.33 kB 🟢 -1.17 kB
assets/cloudRemoteConfig-BvqghttH.js (new) — 951 B 🔴 +951 B 🔴 +514 B 🔴 +421 B
assets/cloudRemoteConfig-C6ahYvQb.js (removed) 951 B — 🟢 -951 B 🟢 -512 B 🟢 -432 B
assets/refreshRemoteConfig-C2s9DGT3.js (removed) 110 B — 🟢 -110 B 🟢 -89 B 🟢 -84 B
assets/refreshRemoteConfig-CUGK4y2q.js (new) — 110 B 🔴 +110 B 🔴 +89 B 🔴 +82 B

Status: 10 added / 10 removed / 16 unchanged

User & Accounts — 27 kB (baseline 27 kB) • ⚪ 0 B

Authentication, profile, and account management bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SignUpForm-BUEKgfQm.js (removed) 12.8 kB — 🟢 -12.8 kB 🟢 -4.31 kB 🟢 -3.76 kB
assets/SignUpForm-wiJS8MT4.js (new) — 12.8 kB 🔴 +12.8 kB 🔴 +4.31 kB 🔴 +3.76 kB
assets/auth-BEa5eti8.js (new) — 3.71 kB 🔴 +3.71 kB 🔴 +1.28 kB 🔴 +1.1 kB
assets/auth-Cey5yczQ.js (removed) 3.71 kB — 🟢 -3.71 kB 🟢 -1.28 kB 🟢 -1.1 kB
assets/UpdatePasswordContent-COJV9o7V.js (new) — 1.85 kB 🔴 +1.85 kB 🔴 +842 B 🔴 +733 B
assets/UpdatePasswordContent-waxBvnuZ.js (removed) 1.85 kB — 🟢 -1.85 kB 🟢 -840 B 🟢 -733 B
assets/authStore-B2xV3IGf.js (new) — 128 B 🔴 +128 B 🔴 +104 B 🔴 +103 B
assets/authStore-m9uZ4_W-.js (removed) 128 B — 🟢 -128 B 🟢 -104 B 🟢 -104 B
assets/workspaceAuthStore-8c6wFViw.js (removed) 108 B — 🟢 -108 B 🟢 -99 B 🟢 -105 B
assets/workspaceAuthStore-Vjk7l0Cw.js (new) — 108 B 🔴 +108 B 🔴 +99 B 🔴 +107 B
assets/auth-DMRPFNgn.js (removed) 105 B — 🟢 -105 B 🟢 -96 B 🟢 -79 B
assets/auth-nuI6zFIP.js (new) — 105 B 🔴 +105 B 🔴 +96 B 🔴 +85 B

Status: 6 added / 6 removed / 4 unchanged

Editors & Dialogs — 125 kB (baseline 125 kB) • ⚪ 0 B

Modals, dialogs, drawers, and in-app editors

File Before After Δ Raw Δ Gzip Δ Brotli
assets/ComfyHubPublishDialog-BcgXyghN.js (new) — 90.1 kB 🔴 +90.1 kB 🔴 +19.3 kB 🔴 +16.5 kB
assets/ComfyHubPublishDialog-D7bDDmkK.js (removed) 90.1 kB — 🟢 -90.1 kB 🟢 -19.3 kB 🟢 -16.5 kB
assets/useShareDialog-BmENr67g.js (new) — 23.9 kB 🔴 +23.9 kB 🔴 +5.69 kB 🔴 +5.04 kB
assets/useShareDialog-BYBYJx5o.js (removed) 23.9 kB — 🟢 -23.9 kB 🟢 -5.69 kB 🟢 -5.04 kB
assets/feedbackDialog-BaxzJV6R.js (new) — 4.45 kB 🔴 +4.45 kB 🔴 +1.86 kB 🔴 +1.59 kB
assets/feedbackDialog-XhaaXP1h.js (removed) 4.45 kB — 🟢 -4.45 kB 🟢 -1.86 kB 🟢 -1.59 kB
assets/useRangeEditor-C03FQ-d4.js (removed) 3.29 kB — 🟢 -3.29 kB 🟢 -1.14 kB 🟢 -1.06 kB
assets/useRangeEditor-DeiXQf8w.js (new) — 3.29 kB 🔴 +3.29 kB 🔴 +1.14 kB 🔴 +1.04 kB
assets/useLayerEditor-BdHItLH_.js (new) — 1.01 kB 🔴 +1.01 kB 🔴 +491 B 🔴 +407 B
assets/useLayerEditor-oByzJcV1.js (removed) 1.01 kB — 🟢 -1.01 kB 🟢 -491 B 🟢 -405 B
assets/ComfyHubPublishDialog-_bX_0Z72.js (removed) 143 B — 🟢 -143 B 🟢 -105 B 🟢 -89 B
assets/ComfyHubPublishDialog-CRSRuBiW.js (new) — 143 B 🔴 +143 B 🔴 +105 B 🔴 +91 B
assets/useSubscriptionDialog-ce8tnr2r.js (new) — 108 B 🔴 +108 B 🔴 +102 B 🔴 +95 B
assets/useSubscriptionDialog-CLzTrH_M.js (removed) 108 B — 🟢 -108 B 🟢 -102 B 🟢 -90 B

Status: 7 added / 7 removed / 1 unchanged

UI Components — 67.1 kB (baseline 67.1 kB) • ⚪ 0 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/ComfyQueueButton-CPm1d2SM.js (removed) 14.6 kB — 🟢 -14.6 kB 🟢 -3.96 kB 🟢 -3.51 kB
assets/ComfyQueueButton-DZqmaVaI.js (new) — 14.6 kB 🔴 +14.6 kB 🔴 +3.96 kB 🔴 +3.51 kB
assets/useTerminalTabs-CkiJ1L28.js (removed) 11.8 kB — 🟢 -11.8 kB 🟢 -3.69 kB 🟢 -3.26 kB
assets/useTerminalTabs-QimcUSMe.js (new) — 11.8 kB 🔴 +11.8 kB 🔴 +3.69 kB 🔴 +3.26 kB
assets/InviteMembersForm-_h2itdaS.js (removed) 8.2 kB — 🟢 -8.2 kB 🟢 -2.72 kB 🟢 -2.44 kB
assets/InviteMembersForm-D2Bo1i2B.js (new) — 8.2 kB 🔴 +8.2 kB 🔴 +2.72 kB 🔴 +2.43 kB
assets/SubscribeButton-BGYMQkUU.js (new) — 2.15 kB 🔴 +2.15 kB 🔴 +966 B 🔴 +848 B
assets/SubscribeButton-DLJ9RpQX.js (removed) 2.15 kB — 🟢 -2.15 kB 🟢 -964 B 🟢 -847 B
assets/cloudFeedbackTopbarButton-B5AXo-HD.js (removed) 705 B — 🟢 -705 B 🟢 -421 B 🟢 -360 B
assets/cloudFeedbackTopbarButton-DLTDXDGF.js (new) — 705 B 🔴 +705 B 🔴 +422 B 🔴 +361 B
assets/ComfyQueueButton-BJcF9yhN.js (new) — 128 B 🔴 +128 B 🔴 +99 B 🔴 +96 B
assets/ComfyQueueButton-CguN55DL.js (removed) 128 B — 🟢 -128 B 🟢 -99 B 🟢 -89 B

Status: 6 added / 6 removed / 8 unchanged

Data & Services — 3.5 MB (baseline 3.5 MB) • 🔴 +1.02 kB

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/settingStore-B9ggpKRz.js (new) — 3.22 MB 🔴 +3.22 MB 🔴 +747 kB 🔴 +562 kB
assets/settingStore-CEWUWWsb.js (removed) 3.22 MB — 🟢 -3.22 MB 🟢 -746 kB 🟢 -562 kB
assets/load3dService-BFuDnWNY.js (removed) 132 kB — 🟢 -132 kB 🟢 -29.3 kB 🟢 -24.6 kB
assets/load3dService-BO3LST47.js (new) — 132 kB 🔴 +132 kB 🔴 +29.3 kB 🔴 +24.6 kB
assets/api-CME8bhpQ.js (removed) 97.7 kB — 🟢 -97.7 kB 🟢 -26.9 kB 🟢 -23.1 kB
assets/api-XigD63lF.js (new) — 97.7 kB 🔴 +97.7 kB 🔴 +26.9 kB 🔴 +23.1 kB
assets/workflowShareService-B5NwJr8s.js (new) — 16.5 kB 🔴 +16.5 kB 🔴 +4.91 kB 🔴 +4.35 kB
assets/workflowShareService-JrDS8OR-.js (removed) 16.5 kB — 🟢 -16.5 kB 🟢 -4.91 kB 🟢 -4.35 kB
assets/keybindingService-CNJ4Euk3.js (removed) 6.89 kB — 🟢 -6.89 kB 🟢 -1.73 kB 🟢 -1.5 kB
assets/keybindingService-Dupq_hD4.js (new) — 6.89 kB 🔴 +6.89 kB 🔴 +1.73 kB 🔴 +1.5 kB
assets/releaseStore-C25_x9p-.js (removed) 6.72 kB — 🟢 -6.72 kB 🟢 -2.02 kB 🟢 -1.77 kB
assets/releaseStore-JVJPmRKk.js (new) — 6.72 kB 🔴 +6.72 kB 🔴 +2.03 kB 🔴 +1.77 kB
assets/systemStatsStore-DRDEP12G.js (new) — 4.93 kB 🔴 +4.93 kB 🔴 +1.74 kB 🔴 +1.47 kB
assets/systemStatsStore-yTnIoxoZ.js (removed) 4.93 kB — 🟢 -4.93 kB 🟢 -1.74 kB 🟢 -1.47 kB
assets/userStore-B9bJ7AVJ.js (new) — 2.38 kB 🔴 +2.38 kB 🔴 +898 B 🔴 +792 B
assets/userStore-cqyPQSf9.js (removed) 2.38 kB — 🟢 -2.38 kB 🟢 -897 B 🟢 -793 B
assets/audioService-BVFKMoLL.js (removed) 1.71 kB — 🟢 -1.71 kB 🟢 -829 B 🟢 -722 B
assets/audioService-BvmK2gon.js (new) — 1.71 kB 🔴 +1.71 kB 🔴 +828 B 🔴 +724 B
assets/dialogService-B3AdM9HC.js (new) — 98 B 🔴 +98 B 🔴 +97 B 🔴 +80 B
assets/dialogService-Bxfp9G0h.js (removed) 98 B — 🟢 -98 B 🟢 -97 B 🟢 -84 B
assets/releaseStore-D5mXkRDB.js (removed) 95 B — 🟢 -95 B 🟢 -86 B 🟢 -89 B
assets/releaseStore-oQ5DsjDP.js (new) — 95 B 🔴 +95 B 🔴 +86 B 🔴 +88 B
assets/settingStore-B3MN4xO6.js (removed) 95 B — 🟢 -95 B 🟢 -86 B 🟢 -83 B
assets/settingStore-CHUD5ODB.js (new) — 95 B 🔴 +95 B 🔴 +86 B 🔴 +82 B
assets/assetsStore-BJQyeEPL.js (new) — 94 B 🔴 +94 B 🔴 +92 B 🔴 +84 B
assets/assetsStore-CZivLh6a.js (removed) 94 B — 🟢 -94 B 🟢 -92 B 🟢 -84 B
assets/api-BRRtKt8K.js (new) — 62 B 🔴 +62 B 🔴 +74 B 🔴 +66 B
assets/api-CNxcdL12.js (removed) 62 B — 🟢 -62 B 🟢 -74 B 🟢 -65 B

Status: 14 added / 14 removed / 3 unchanged

Utilities & Hooks — 549 kB (baseline 549 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/useConflictDetection-BT6IHNyf.js (new) — 236 kB 🔴 +236 kB 🔴 +52.9 kB 🔴 +43 kB
assets/useConflictDetection-kVYyiZbc.js (removed) 236 kB — 🟢 -236 kB 🟢 -52.9 kB 🟢 -43 kB
assets/useLayerEditorSession-Bcmr9MOP.js (new) — 158 kB 🔴 +158 kB 🔴 +40.8 kB 🔴 +34.3 kB
assets/useLayerEditorSession-Be8j3hHz.js (removed) 158 kB — 🟢 -158 kB 🟢 -40.8 kB 🟢 -34.3 kB
assets/useLoad3d-CjyxTIae.js (new) — 25.8 kB 🔴 +25.8 kB 🔴 +5.8 kB 🔴 +5.14 kB
assets/useLoad3d-Dbezich8.js (removed) 25.8 kB — 🟢 -25.8 kB 🟢 -5.8 kB 🟢 -5.15 kB
assets/useLoad3dViewer-C-k28Mhh.js (new) — 21.2 kB 🔴 +21.2 kB 🔴 +4.98 kB 🔴 +4.36 kB
assets/useLoad3dViewer-SbuDqlzn.js (removed) 21.2 kB — 🟢 -21.2 kB 🟢 -4.98 kB 🟢 -4.37 kB
assets/useImageCrop-C8mru3HK.js (new) — 14.9 kB 🔴 +14.9 kB 🔴 +3.42 kB 🔴 +2.99 kB
assets/useImageCrop-DGjVMH29.js (removed) 14.9 kB — 🟢 -14.9 kB 🟢 -3.42 kB 🟢 -2.99 kB
assets/useDowngradeToPersonal-B5Dw4oZ8.js (removed) 10.9 kB — 🟢 -10.9 kB 🟢 -2.75 kB 🟢 -2.36 kB
assets/useDowngradeToPersonal-CmWBluDE.js (new) — 10.9 kB 🔴 +10.9 kB 🔴 +2.75 kB 🔴 +2.36 kB
assets/useFeatureFlags-BWn8IxEU.js (new) — 6.73 kB 🔴 +6.73 kB 🔴 +1.96 kB 🔴 +1.65 kB
assets/useFeatureFlags-D9qltUkD.js (removed) 6.73 kB — 🟢 -6.73 kB 🟢 -1.96 kB 🟢 -1.65 kB
assets/useCompositorLayers-CiwrxlLs.js (new) — 2.94 kB 🔴 +2.94 kB 🔴 +897 B 🔴 +798 B
assets/useCompositorLayers-DAlmwo8F.js (removed) 2.94 kB — 🟢 -2.94 kB 🟢 -895 B 🟢 -797 B
assets/assetPreviewUtil-D11EPolr.js (new) — 2.35 kB 🔴 +2.35 kB 🔴 +970 B 🔴 +839 B
assets/assetPreviewUtil-DTv86gjK.js (removed) 2.35 kB — 🟢 -2.35 kB 🟢 -969 B 🟢 -838 B
assets/useUpstreamValue-Bqa4kw0h.js (removed) 1.99 kB — 🟢 -1.99 kB 🟢 -757 B 🟢 -702 B
assets/useUpstreamValue-CGPO2aXx.js (new) — 1.99 kB 🔴 +1.99 kB 🔴 +758 B 🔴 +679 B
assets/useWorkspaceTierLabel-B_nN9_xH.js (new) — 1.93 kB 🔴 +1.93 kB 🔴 +813 B 🔴 +697 B
assets/useWorkspaceTierLabel-BG_ANMoC.js (removed) 1.93 kB — 🟢 -1.93 kB 🟢 -814 B 🟢 -699 B
assets/subscriptionCheckoutUtil-CN7F6pvi.js (removed) 877 B — 🟢 -877 B 🟢 -521 B 🟢 -439 B
assets/subscriptionCheckoutUtil-DdNn9OuQ.js (new) — 877 B 🔴 +877 B 🔴 +523 B 🔴 +437 B
assets/useSessionCookie-BFeNndbF.js (removed) 652 B — 🟢 -652 B 🟢 -337 B 🟢 -293 B
assets/useSessionCookie-C8_dNP7p.js (new) — 652 B 🔴 +652 B 🔴 +338 B 🔴 +290 B
assets/useLoad3d-BSd1E3lb.js (new) — 311 B 🔴 +311 B 🔴 +163 B 🔴 +146 B
assets/useLoad3d-DgPUYDXH.js (removed) 311 B — 🟢 -311 B 🟢 -163 B 🟢 -146 B
assets/useSessionCookie-CZ4GJsQu.js (new) — 101 B 🔴 +101 B 🔴 +86 B 🔴 +83 B
assets/useSessionCookie-DiIRBJY5.js (removed) 101 B — 🟢 -101 B 🟢 -86 B 🟢 -85 B
assets/useFeatureFlags-BBp1kqMX.js (removed) 98 B — 🟢 -98 B 🟢 -85 B 🟢 -80 B
assets/useFeatureFlags-BKppDYvc.js (new) — 98 B 🔴 +98 B 🔴 +85 B 🔴 +96 B
assets/useLoad3dViewer-CSg0TGd-.js (new) — 98 B 🔴 +98 B 🔴 +85 B 🔴 +82 B
assets/useLoad3dViewer-IM1WJYZr.js (removed) 98 B — 🟢 -98 B 🟢 -85 B 🟢 -85 B
assets/useCurrentUser-BcG5tdvR.js (new) — 94 B 🔴 +94 B 🔴 +95 B 🔴 +84 B
assets/useCurrentUser-DNswnnr9.js (removed) 94 B — 🟢 -94 B 🟢 -95 B 🟢 -86 B

Status: 18 added / 18 removed / 20 unchanged

Vendor & Third-Party — 16.3 MB (baseline 16.3 MB) • ⚪ 0 B

External libraries and shared vendor chunks

Status: 17 unchanged

Other — 14 MB (baseline 14 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/core-Cg8DkEhr.js (new) — 115 kB 🔴 +115 kB 🔴 +29.7 kB 🔴 +25.1 kB
assets/core-XMReP3UU.js (removed) 115 kB — 🟢 -115 kB 🟢 -29.7 kB 🟢 -25.1 kB
assets/WidgetSelect-Cu7lXk85.js (new) — 88.8 kB 🔴 +88.8 kB 🔴 +20.1 kB 🔴 +17.2 kB
assets/WidgetSelect-Dwglk2JK.js (removed) 88.8 kB — 🟢 -88.8 kB 🟢 -20.1 kB 🟢 -17.2 kB
assets/SubscriptionPanelContentWorkspace-bnuagdVQ.js (removed) 80 kB — 🟢 -80 kB 🟢 -15.8 kB 🟢 -13.6 kB
assets/SubscriptionPanelContentWorkspace-COiPSIbA.js (new) — 80 kB 🔴 +80 kB 🔴 +15.8 kB 🔴 +13.6 kB
assets/Load3D-6qmddyM_.js (new) — 71.3 kB 🔴 +71.3 kB 🔴 +11.7 kB 🔴 +9.97 kB
assets/Load3D-OIKsaXkP.js (removed) 71.3 kB — 🟢 -71.3 kB 🟢 -11.7 kB 🟢 -9.98 kB
assets/SubscriptionTransitionPreviewWorkspace-Bzj4yPFM.js (new) — 66.4 kB 🔴 +66.4 kB 🔴 +13.4 kB 🔴 +11.7 kB
assets/SubscriptionTransitionPreviewWorkspace-iz3-trrS.js (removed) 66.4 kB — 🟢 -66.4 kB 🟢 -13.4 kB 🟢 -11.7 kB
assets/WidgetVideoEdit-8FLrNYa-.js (removed) 63.4 kB — 🟢 -63.4 kB 🟢 -14.6 kB 🟢 -12.9 kB
assets/WidgetVideoEdit-CELC512Z.js (new) — 63.4 kB 🔴 +63.4 kB 🔴 +14.6 kB 🔴 +12.8 kB
assets/WorkspaceSettingsPanelContent-BI0Mjsoh.js (removed) 61.7 kB — 🟢 -61.7 kB 🟢 -13.2 kB 🟢 -11.5 kB
assets/WorkspaceSettingsPanelContent-DS4mT0wP.js (new) — 61.7 kB 🔴 +61.7 kB 🔴 +13.2 kB 🔴 +11.5 kB
assets/Preview3d-CC0PCBSH.js (removed) 50.9 kB — 🟢 -50.9 kB 🟢 -8.3 kB 🟢 -7.24 kB
assets/Preview3d-Dui6Ly_W.js (new) — 50.9 kB 🔴 +50.9 kB 🔴 +8.3 kB 🔴 +7.25 kB
assets/main-B8mYwMz1.js (removed) 45.1 kB — 🟢 -45.1 kB 🟢 -13.1 kB 🟢 -11.4 kB
assets/main-khMv8LN0.js (new) — 45.1 kB 🔴 +45.1 kB 🔴 +13.1 kB 🔴 +11.4 kB
assets/SubscriptionRequiredDialogContentUnified-B8kkGymf.js (new) — 42.6 kB 🔴 +42.6 kB 🔴 +9.35 kB 🔴 +8.15 kB
assets/SubscriptionRequiredDialogContentUnified-CCzJ_7-X.js (removed) 42.6 kB — 🟢 -42.6 kB 🟢 -9.35 kB 🟢 -8.16 kB
assets/LayerEditorContent-BnecgtMy.js (removed) 42.5 kB — 🟢 -42.5 kB 🟢 -9.61 kB 🟢 -8.43 kB
assets/LayerEditorContent-D26UN8fP.js (new) — 42.5 kB 🔴 +42.5 kB 🔴 +9.61 kB 🔴 +8.43 kB
assets/WidgetBoundingBoxes-BLmBHyCT.js (new) — 33.7 kB 🔴 +33.7 kB 🔴 +9.15 kB 🔴 +8.12 kB
assets/WidgetBoundingBoxes-DNq4LtGl.js (removed) 33.7 kB — 🟢 -33.7 kB 🟢 -9.15 kB 🟢 -8.12 kB
assets/WidgetPainter-BiEW3mNG.js (new) — 32.6 kB 🔴 +32.6 kB 🔴 +7.86 kB 🔴 +6.97 kB
assets/WidgetPainter-DQwaKesG.js (removed) 32.6 kB — 🟢 -32.6 kB 🟢 -7.86 kB 🟢 -6.97 kB
assets/Load3dViewerContent-tKII5CR_.js (removed) 30.8 kB — 🟢 -30.8 kB 🟢 -6.28 kB 🟢 -5.45 kB
assets/Load3dViewerContent-x3ZOxWlv.js (new) — 30.8 kB 🔴 +30.8 kB 🔴 +6.28 kB 🔴 +5.45 kB
assets/SubscriptionRequiredDialogContent-DsesJBk_.js (new) — 27 kB 🔴 +27 kB 🔴 +6.37 kB 🔴 +5.62 kB
assets/SubscriptionRequiredDialogContent-VsdgVceD.js (removed) 27 kB — 🟢 -27 kB 🟢 -6.37 kB 🟢 -5.61 kB
assets/SubscriptionRequiredDialogContentWorkspace-Beb3c1py.js (removed) 25.1 kB — 🟢 -25.1 kB 🟢 -5.79 kB 🟢 -5.09 kB
assets/SubscriptionRequiredDialogContentWorkspace-C6QgZVq_.js (new) — 25.1 kB 🔴 +25.1 kB 🔴 +5.79 kB 🔴 +5.1 kB
assets/CreditsTile-g13Ra817.js (new) — 24.9 kB 🔴 +24.9 kB 🔴 +6.64 kB 🔴 +5.82 kB
assets/CreditsTile-YUaxCfH3.js (removed) 24.9 kB — 🟢 -24.9 kB 🟢 -6.64 kB 🟢 -5.82 kB
assets/load3d-Cg97MotG.js (removed) 22.2 kB — 🟢 -22.2 kB 🟢 -5.4 kB 🟢 -4.66 kB
assets/load3d-nBlmQ-6J.js (new) — 22.2 kB 🔴 +22.2 kB 🔴 +5.4 kB 🔴 +4.66 kB
assets/CurrentUserPopoverWorkspace-CzSIeh5y.js (new) — 21.5 kB 🔴 +21.5 kB 🔴 +4.84 kB 🔴 +4.31 kB
assets/CurrentUserPopoverWorkspace-GSGg8IHT.js (removed) 21.5 kB — 🟢 -21.5 kB 🟢 -4.84 kB 🟢 -4.31 kB
assets/SignInContent-CTpjvuVI.js (removed) 20.2 kB — 🟢 -20.2 kB 🟢 -5.09 kB 🟢 -4.45 kB
assets/SignInContent-Dvy7VINi.js (new) — 20.2 kB 🔴 +20.2 kB 🔴 +5.09 kB 🔴 +4.45 kB
assets/WidgetRecordAudio-B0xgbH3v.js (new) — 16.6 kB 🔴 +16.6 kB 🔴 +4.59 kB 🔴 +4.1 kB
assets/WidgetRecordAudio-BehJiidr.js (removed) 16.6 kB — 🟢 -16.6 kB 🟢 -4.59 kB 🟢 -4.1 kB
assets/WidgetInputNumber-D1F7eQj0.js (new) — 13.9 kB 🔴 +13.9 kB 🔴 +3.63 kB 🔴 +3.21 kB
assets/WidgetInputNumber-DYRTBFmo.js (removed) 13.9 kB — 🟢 -13.9 kB 🟢 -3.63 kB 🟢 -3.21 kB
assets/WidgetRange-CGTpNoN_.js (new) — 13.7 kB 🔴 +13.7 kB 🔴 +3.55 kB 🔴 +3.13 kB
assets/WidgetRange-Crf9RtDI.js (removed) 13.7 kB — 🟢 -13.7 kB 🟢 -3.55 kB 🟢 -3.13 kB
assets/WaveAudioPlayer-BdWORa6e.js (new) — 12.8 kB 🔴 +12.8 kB 🔴 +3.46 kB 🔴 +3.05 kB
assets/WaveAudioPlayer-CoDLB3co.js (removed) 12.8 kB — 🟢 -12.8 kB 🟢 -3.46 kB 🟢 -3.05 kB
assets/WidgetCurve-BBxaQ0LZ.js (removed) 11.2 kB — 🟢 -11.2 kB 🟢 -3.47 kB 🟢 -3.15 kB
assets/WidgetCurve-O9cIWJQt.js (new) — 11.2 kB 🔴 +11.2 kB 🔴 +3.47 kB 🔴 +3.14 kB
assets/TeamWorkspacesDialogContent-CuCSXZ2a.js (new) — 10.3 kB 🔴 +10.3 kB 🔴 +2.97 kB 🔴 +2.63 kB
assets/TeamWorkspacesDialogContent-D03Bindl.js (removed) 10.3 kB — 🟢 -10.3 kB 🟢 -2.96 kB 🟢 -2.63 kB
assets/onboardingCloudRoutes-B_qmA3st.js (removed) 9.22 kB — 🟢 -9.22 kB 🟢 -2.82 kB 🟢 -2.4 kB
assets/onboardingCloudRoutes-BIxEoIJs.js (new) — 9.22 kB 🔴 +9.22 kB 🔴 +2.81 kB 🔴 +2.41 kB
assets/Load3DConfiguration-05rD7Kai.js (new) — 8.91 kB 🔴 +8.91 kB 🔴 +2.61 kB 🔴 +2.3 kB
assets/Load3DConfiguration-mivjVmFr.js (removed) 8.91 kB — 🟢 -8.91 kB 🟢 -2.61 kB 🟢 -2.3 kB
assets/WidgetImageCrop-CPm-0ziy.js (new) — 8.49 kB 🔴 +8.49 kB 🔴 +2.65 kB 🔴 +2.33 kB
assets/WidgetImageCrop-DMWGAyzY.js (removed) 8.49 kB — 🟢 -8.49 kB 🟢 -2.65 kB 🟢 -2.33 kB
assets/SetMemberCreditLimitDialogContent-CqHbURhR.js (new) — 8.47 kB 🔴 +8.47 kB 🔴 +2.34 kB 🔴 +2.06 kB
assets/SetMemberCreditLimitDialogContent-CWaJuG11.js (removed) 8.47 kB — 🟢 -8.47 kB 🟢 -2.34 kB 🟢 -2.05 kB
assets/nodeTemplates-BHEOY2nD.js (removed) 8.32 kB — 🟢 -8.32 kB 🟢 -2.85 kB 🟢 -2.51 kB
assets/nodeTemplates-DGrhBGuF.js (new) — 8.32 kB 🔴 +8.32 kB 🔴 +2.85 kB 🔴 +2.5 kB
assets/NightlySurveyController-Btwwo-wd.js (new) — 7.5 kB 🔴 +7.5 kB 🔴 +2.55 kB 🔴 +2.24 kB
assets/NightlySurveyController-DRUpNVVY.js (removed) 7.5 kB — 🟢 -7.5 kB 🟢 -2.55 kB 🟢 -2.24 kB
assets/CloudRunButtonWrapper-BLH7FPfw.js (removed) 6.82 kB — 🟢 -6.82 kB 🟢 -2.17 kB 🟢 -1.91 kB
assets/CloudRunButtonWrapper-DiDUyWvz.js (new) — 6.82 kB 🔴 +6.82 kB 🔴 +2.18 kB 🔴 +1.91 kB
assets/WidgetWithControl-DKH_6iWc.js (removed) 6.41 kB — 🟢 -6.41 kB 🟢 -2.61 kB 🟢 -2.32 kB
assets/WidgetWithControl-mybehZez.js (new) — 6.41 kB 🔴 +6.41 kB 🔴 +2.61 kB 🔴 +2.31 kB
assets/missingModelMetadata-BBdeiQlR.js (removed) 6.17 kB — 🟢 -6.17 kB 🟢 -2.13 kB 🟢 -1.86 kB
assets/missingModelMetadata-BuPLPpRW.js (new) — 6.17 kB 🔴 +6.17 kB 🔴 +2.13 kB 🔴 +1.86 kB
assets/CancelSubscriptionDialogContent-BkOKADbn.js (new) — 5.97 kB 🔴 +5.97 kB 🔴 +1.98 kB 🔴 +1.75 kB
assets/CancelSubscriptionDialogContent-hJoG_828.js (removed) 5.97 kB — 🟢 -5.97 kB 🟢 -1.98 kB 🟢 -1.75 kB
assets/load3dPreviewExtensions-BlCnaAmP.js (new) — 5.88 kB 🔴 +5.88 kB 🔴 +1.81 kB 🔴 +1.6 kB
assets/load3dPreviewExtensions-CIb5n_oP.js (removed) 5.88 kB — 🟢 -5.88 kB 🟢 -1.81 kB 🟢 -1.59 kB
assets/launchCancellationFlow-CHXCuCAJ.js (new) — 5.18 kB 🔴 +5.18 kB 🔴 +1.78 kB 🔴 +1.56 kB
assets/launchCancellationFlow-DqWzz2vC.js (removed) 5.18 kB — 🟢 -5.18 kB 🟢 -1.78 kB 🟢 -1.56 kB
assets/CreateWorkspaceDialogContent-Bnz14o9W.js (new) — 5.12 kB 🔴 +5.12 kB 🔴 +1.79 kB 🔴 +1.55 kB
assets/CreateWorkspaceDialogContent-DqKcjhUy.js (removed) 5.12 kB — 🟢 -5.12 kB 🟢 -1.79 kB 🟢 -1.55 kB
assets/ChangeMemberRoleDialogContent-BV6Hd0ty.js (removed) 4.97 kB — 🟢 -4.97 kB 🟢 -1.64 kB 🟢 -1.43 kB
assets/ChangeMemberRoleDialogContent-nrhyqCZF.js (new) — 4.97 kB 🔴 +4.97 kB 🔴 +1.64 kB 🔴 +1.42 kB
assets/InviteMemberDialogContent-CovoLfRj.js (new) — 4.96 kB 🔴 +4.96 kB 🔴 +1.64 kB 🔴 +1.43 kB
assets/InviteMemberDialogContent-oh2wB1MM.js (removed) 4.96 kB — 🟢 -4.96 kB 🟢 -1.64 kB 🟢 -1.44 kB
assets/EditWorkspaceDialogContent-B0rYSweB.js (new) — 4.93 kB 🔴 +4.93 kB 🔴 +1.76 kB 🔴 +1.53 kB
assets/EditWorkspaceDialogContent-CCnaYFLj.js (removed) 4.93 kB — 🟢 -4.93 kB 🟢 -1.76 kB 🟢 -1.53 kB
assets/WidgetTextarea-Bx7A1SMe.js (removed) 4.81 kB — 🟢 -4.81 kB 🟢 -1.87 kB 🟢 -1.63 kB
assets/WidgetTextarea-u1k8Ni9M.js (new) — 4.81 kB 🔴 +4.81 kB 🔴 +1.87 kB 🔴 +1.63 kB
assets/saveMesh-D2Xma7p7.js (new) — 4.76 kB 🔴 +4.76 kB 🔴 +1.52 kB 🔴 +1.35 kB
assets/saveMesh-DNHkoFgH.js (removed) 4.76 kB — 🟢 -4.76 kB 🟢 -1.52 kB 🟢 -1.35 kB
assets/WorkspacePanelContent-B_VPukPz.js (new) — 4.74 kB 🔴 +4.74 kB 🔴 +1.62 kB 🔴 +1.44 kB
assets/WorkspacePanelContent-Bc4b7u52.js (removed) 4.74 kB — 🟢 -4.74 kB 🟢 -1.62 kB 🟢 -1.44 kB
assets/ValueControlPopover-BO_kc40Y.js (removed) 4.49 kB — 🟢 -4.49 kB 🟢 -1.55 kB 🟢 -1.38 kB
assets/ValueControlPopover-BwON3PMJ.js (new) — 4.49 kB 🔴 +4.49 kB 🔴 +1.55 kB 🔴 +1.38 kB
assets/DeleteWorkspaceDialogContent-CIfne2cl.js (new) — 3.84 kB 🔴 +3.84 kB 🔴 +1.44 kB 🔴 +1.24 kB
assets/DeleteWorkspaceDialogContent-CiHQUMEj.js (removed) 3.84 kB — 🟢 -3.84 kB 🟢 -1.44 kB 🟢 -1.23 kB
assets/RemoveMemberDialogContent-C3M10j8L.js (new) — 3.76 kB 🔴 +3.76 kB 🔴 +1.38 kB 🔴 +1.2 kB
assets/RemoveMemberDialogContent-DCSAxeGw.js (removed) 3.76 kB — 🟢 -3.76 kB 🟢 -1.38 kB 🟢 -1.22 kB
assets/RevokeInviteDialogContent-CGhPeNuB.js (new) — 3.67 kB 🔴 +3.67 kB 🔴 +1.39 kB 🔴 +1.21 kB
assets/RevokeInviteDialogContent-m2x836uQ.js (removed) 3.67 kB — 🟢 -3.67 kB 🟢 -1.39 kB 🟢 -1.21 kB
assets/LeaveWorkspaceDialogContent-BAzLrNE2.js (new) — 3.67 kB 🔴 +3.67 kB 🔴 +1.38 kB 🔴 +1.19 kB
assets/LeaveWorkspaceDialogContent-i3NBHPK5.js (removed) 3.67 kB — 🟢 -3.67 kB 🟢 -1.38 kB 🟢 -1.19 kB
assets/InviteMemberUpsellDialogContent-BcrozZJ-.js (removed) 3.47 kB — 🟢 -3.47 kB 🟢 -1.24 kB 🟢 -1.07 kB
assets/InviteMemberUpsellDialogContent-CyYcmk45.js (new) — 3.47 kB 🔴 +3.47 kB 🔴 +1.24 kB 🔴 +1.08 kB
assets/workspaceCheckoutTelemetry-C1BZ5XFi.js (removed) 3.4 kB — 🟢 -3.4 kB 🟢 -1.52 kB 🟢 -1.33 kB
assets/workspaceCheckoutTelemetry-CcZgzsXp.js (new) — 3.4 kB 🔴 +3.4 kB 🔴 +1.52 kB 🔴 +1.33 kB
assets/GlobalToast-QJtYaMZa.js (removed) 3.25 kB — 🟢 -3.25 kB 🟢 -1.3 kB 🟢 -1.11 kB
assets/GlobalToast-Y1paqn9w.js (new) — 3.25 kB 🔴 +3.25 kB 🔴 +1.3 kB 🔴 +1.11 kB
assets/Media3DTop-D3q0e7hs.js (removed) 3.21 kB — 🟢 -3.21 kB 🟢 -1.26 kB 🟢 -1.1 kB
assets/Media3DTop-j2tirRf_.js (new) — 3.21 kB 🔴 +3.21 kB 🔴 +1.26 kB 🔴 +1.1 kB
assets/load3dAdvanced-DIOOw7vk.js (removed) 2.82 kB — 🟢 -2.82 kB 🟢 -1.09 kB 🟢 -953 B
assets/load3dAdvanced-DxYnI10D.js (new) — 2.82 kB 🔴 +2.82 kB 🔴 +1.1 kB 🔴 +955 B
assets/SubscribeToRun-B5I1rrv6.js (removed) 2.39 kB — 🟢 -2.39 kB 🟢 -1.03 kB 🟢 -900 B
assets/SubscribeToRun-CqcdXs5o.js (new) — 2.39 kB 🔴 +2.39 kB 🔴 +1.03 kB 🔴 +900 B
assets/MediaAudioTop-Bl3Rzbzb.js (new) — 1.62 kB 🔴 +1.62 kB 🔴 +806 B 🔴 +670 B
assets/MediaAudioTop-CMxgb95f.js (removed) 1.62 kB — 🟢 -1.62 kB 🟢 -805 B 🟢 -671 B
assets/cloudSessionCookie-B0M2komb.js (new) — 933 B 🔴 +933 B 🔴 +435 B 🔴 +379 B
assets/cloudSessionCookie-BoKLewCp.js (removed) 933 B — 🟢 -933 B 🟢 -430 B 🟢 -377 B
assets/cloudBadges-DaMFsjeh.js (removed) 922 B — 🟢 -922 B 🟢 -514 B 🟢 -467 B
assets/cloudBadges-DImGzLev.js (new) — 922 B 🔴 +922 B 🔴 +514 B 🔴 +471 B
assets/Load3DAdvanced-B0YxJsyo.js (new) — 761 B 🔴 +761 B 🔴 +423 B 🔴 +358 B
assets/Load3DAdvanced-DDmIzZYm.js (removed) 761 B — 🟢 -761 B 🟢 -423 B 🟢 -359 B
assets/nightlyBadges-BZJIwKgQ.js (removed) 411 B — 🟢 -411 B 🟢 -271 B 🟢 -262 B
assets/nightlyBadges-C8wVBUNB.js (new) — 411 B 🔴 +411 B 🔴 +271 B 🔴 +231 B
assets/Load3dViewerContent-CHUdoQuN.js (removed) 137 B — 🟢 -137 B 🟢 -103 B 🟢 -92 B
assets/Load3dViewerContent-CJGJWQ4O.js (new) — 137 B 🔴 +137 B 🔴 +103 B 🔴 +91 B
assets/missingModelMetadata-BftTbbMG.js (new) — 125 B 🔴 +125 B 🔴 +103 B 🔴 +103 B
assets/missingModelMetadata-BoKtjeet.js (removed) 125 B — 🟢 -125 B 🟢 -103 B 🟢 -101 B
assets/Load3DAdvanced-7zjkgyIc.js (new) — 122 B 🔴 +122 B 🔴 +97 B 🔴 +91 B
assets/Load3DAdvanced-BzE1OJ9I.js (removed) 122 B — 🟢 -122 B 🟢 -97 B 🟢 -90 B
assets/WidgetLegacy-BP6Rwk_p.js (new) — 117 B 🔴 +117 B 🔴 +106 B 🔴 +93 B
assets/WidgetLegacy-C2ia9qrT.js (removed) 117 B — 🟢 -117 B 🟢 -106 B 🟢 -100 B
assets/workflowDraftStoreV2-BEKpdJVn.js (removed) 112 B — 🟢 -112 B 🟢 -101 B 🟢 -108 B
assets/workflowDraftStoreV2-DGCu11ie.js (new) — 112 B 🔴 +112 B 🔴 +101 B 🔴 +109 B
assets/Load3D-56opuU_u.js (new) — 98 B 🔴 +98 B 🔴 +89 B 🔴 +83 B
assets/Load3D-krM-LrHf.js (removed) 98 B — 🟢 -98 B 🟢 -89 B 🟢 -86 B
assets/changeTracker-BiF5qrkg.js (removed) 91 B — 🟢 -91 B 🟢 -93 B 🟢 -82 B
assets/changeTracker-DLryXX1O.js (new) — 91 B 🔴 +91 B 🔴 +93 B 🔴 +84 B

Status: 68 added / 68 removed / 218 unchanged

⚡ Performance

⏳ Performance tests in progress…

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR improves large-graph rendering by adding viewport culling, a version-aware QuadTree index, canvas-based low-detail node rendering, and minimap change-detection optimizations. It also adds tests and documents benchmark results, methodology, caveats, and follow-up work.

Changes

Large-graph performance

Layer / File(s) Summary
Minimap change detection and data caching
src/renderer/extensions/minimap/..., src/renderer/core/layout/store/layoutStore.ts
The minimap uses rolling digests, 100 ms polling, memoized node data, direct node lookup, and new layout-store count and version getters.
Viewport culling and spatial indexing
src/composables/graph/useViewportCulling.*, src/renderer/core/spatial/..., src/components/graph/GraphCanvas.vue
Vue nodes are selected from an expanded viewport through a version-aware QuadTree. Pinned and unmeasured nodes remain supported, while stale mounts are delayed and pruned.
Canvas low-detail node rendering
src/renderer/core/canvas/..., src/renderer/extensions/vueNodes/..., src/components/graph/GraphCanvas.vue
Low zoom replaces Vue node components with a DPR-aware canvas overlay that draws transformed node rectangles.
Performance documentation
docs/architecture/vue-nodes-large-graph-performance.md
The documentation records benchmark results, measurement methodology, implementation details, caveats, and remaining performance work.

Estimated code review effort: 4 (Complex) | ~60 minutes

Suggested labels: size:L

Sequence Diagram(s)

sequenceDiagram
  participant GraphCanvas
  participant useViewportCulling
  participant nodeCullingIndex
  participant NodeBoxOverlay
  participant drawNodeBoxes
  GraphCanvas->>useViewportCulling: calculate mounted node IDs
  useViewportCulling->>nodeCullingIndex: query expanded viewport
  nodeCullingIndex-->>GraphCanvas: return visible node IDs
  GraphCanvas->>NodeBoxOverlay: provide visible node boxes at low quality
  NodeBoxOverlay->>drawNodeBoxes: render transformed rectangles
Loading

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
End-To-End Regression Coverage For Fixes ❓ Inconclusive The changed-file list is available, but the PR title and exact commit subjects are not provided, so the required bug-fix signal cannot be verified. Provide the PR title and exact commit subjects to determine whether the check's bug-fix condition applies.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main performance improvement for Vue nodes on large graphs.
Description check ✅ Passed The description covers the required sections and provides detailed scope, benchmarks, review focus, testing, and known limitations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Adr Compliance For Entity/Litegraph Changes ✅ Passed Graph-related files changed, but the supplied PR metadata shows no direct spatial assignments, god-object growth, ECS component methods/back-references, or listed extension callback changes.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch benjcooley/virtualize-nodes-20-graph

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/graph/GraphCanvas.vue`:
- Around line 317-322: Update getNodeBoxes to return a lazy Iterable<NodeBox>
using a generator instead of allocating a mapped array for every frame. Import
the NodeBox type, yield each cullingIndex entry with its bounds and color, and
remove the non-null assertion now that entries() provides narrowed bounds; keep
drawNodeBoxes unchanged.
- Around line 337-338: Update the graph indexing setup around getEntries to
hoist and reuse a single getAllNodes() computed outside the callback, then read
its cached value when building entries. Avoid calling layoutStore.getAllNodes()
inside each rebuild so the full layout map is materialized only when
layoutVersion invalidates it.

In `@src/composables/graph/useViewportCulling.test.ts`:
- Around line 61-64: Update src/composables/graph/useViewportCulling.test.ts at
lines 61-64 and 48-58: track each effectScope created by setup, then add a
shared afterEach that stops those scopes and calls vi.useRealTimers(). Ensure
cleanup runs after every test so watchers and fake timers do not leak.

In `@src/composables/graph/useViewportCulling.ts`:
- Line 188: Update the resize listener in the viewport culling setup to use the
existing refreshThrottled handler instead of refreshMountedNodes, preserving the
RECOMPUTE_THROTTLE_MS limit used by the camera path.

In `@src/renderer/core/canvas/nodeBoxRenderer.ts`:
- Around line 68-75: Update intersects to reuse the existing boundsIntersect
helper from layoutMath.ts instead of duplicating the overlap logic. Preserve the
current edge-inclusive behavior, including treating touching edges as
intersecting, and remove the local comparison implementation.

In `@src/renderer/core/spatial/nodeCullingIndex.ts`:
- Around line 116-119: Update nodeCullingIndex.ts lines 116-119 by introducing
or reusing a narrowed entry type with non-null Bounds, and type
positionedEntries and entries() accordingly; remove the bounds! assertion at
line 92. In GraphCanvas.vue lines 317-322, remove entry.bounds! in getNodeBoxes
and rely on the narrowed entries() type.
- Around line 47-48: Define and use a narrowed positioned-entry type for entries
whose bounds are guaranteed non-null, and type positionedEntries accordingly.
Update the relevant accessor and getNodeBoxes in GraphCanvas.vue to return/use
this narrowed type so the bounds non-null assertion in the positioning loop and
getNodeBoxes can be removed without suppression assertions.

In `@src/renderer/extensions/minimap/composables/useMinimap.test.ts`:
- Around line 89-110: The useIntervalFn mock in the minimap tests must model
fake-timer scheduling instead of invoking callbacks immediately on resume.
Update the mock to honor the 100 ms interval and cancel pending callbacks when
pause() or destroy() occurs, then assert no update at 99 ms, exactly one at 100
ms, and none after pause() or destroy().

In `@src/renderer/extensions/minimap/composables/useMinimapGraph.ts`:
- Around line 43-68: The connection digest in computeLinkDigest currently mixes
only origin_id and target_id; also mix origin_slot and target_slot for every
link so slot-only rewires are detected. Add a regression case in
src/renderer/extensions/minimap/composables/useMinimapGraph.test.ts lines
308-334 that changes only one slot and verifies the connection change is
reported.

In `@src/renderer/extensions/vueNodes/components/NodeBoxOverlay.vue`:
- Around line 67-71: Add aria-hidden="true" to the decorative canvas element
identified by data-testid="node-box-overlay" in NodeBoxOverlay.vue, leaving its
existing rendering and pointer-events attributes unchanged.
- Around line 51-57: Move the --node-box-color resolution out of the useRafFn
frame callback and cache it once during component setup or onMounted, then pass
the cached value as defaultColor to drawNodeBoxes. Add onMounted if needed,
preserve the `#353535` fallback, and only recompute through an appropriate
palette/theme watcher if runtime theme changes must be supported.

In `@src/renderer/extensions/vueNodes/composables/useLowQualityRendering.test.ts`:
- Around line 16-37: Add tests for the useLowQualityRendering watcher, driving
camera.z across getLowQualityThreshold in both low- and high-quality directions.
Assert that each transition updates layoutStore.pendingSlotSync appropriately
and invokes the canvas setDirty side effect, covering the high-quality
transition that is currently untested.

In `@src/renderer/extensions/vueNodes/composables/useLowQualityRendering.ts`:
- Around line 23-28: Update getLowQualityThreshold to use the same zero-value
guard as LGraphCanvas.updateLowQualityThreshold, or otherwise apply consistent
negative-value validation in both paths; preserve the shared threshold formula
and documented parity.
- Around line 45-52: Update the isLowQuality watcher to detect the true-to-false
transition using its previous value and set layoutStore.pendingSlotSync to true
before remounting; preserve the immediate high-quality run without triggering
synchronization, while retaining the existing low-quality reset and canvas
dirtiness behavior. Add a regression test covering the transition and
pending-slot synchronization.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 28c58095-ddd0-4546-8a7a-a978349717b0

📥 Commits

Reviewing files that changed from the base of the PR and between 4640bbe and 82e7095.

📒 Files selected for processing (21)
  • docs/architecture/vue-nodes-large-graph-performance.md
  • src/components/graph/GraphCanvas.vue
  • src/composables/graph/useViewportCulling.test.ts
  • src/composables/graph/useViewportCulling.ts
  • src/renderer/core/canvas/nodeBoxRenderer.test.ts
  • src/renderer/core/canvas/nodeBoxRenderer.ts
  • src/renderer/core/layout/store/layoutStore.ts
  • src/renderer/core/spatial/nodeCullingIndex.test.ts
  • src/renderer/core/spatial/nodeCullingIndex.ts
  • src/renderer/extensions/minimap/composables/useMinimap.test.ts
  • src/renderer/extensions/minimap/composables/useMinimap.ts
  • src/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • src/renderer/extensions/minimap/composables/useMinimapGraph.ts
  • src/renderer/extensions/minimap/data/AbstractMinimapDataSource.ts
  • src/renderer/extensions/minimap/data/LayoutStoreDataSource.ts
  • src/renderer/extensions/minimap/data/LiteGraphDataSource.ts
  • src/renderer/extensions/minimap/data/MinimapDataSource.test.ts
  • src/renderer/extensions/minimap/data/MinimapDataSourceFactory.ts
  • src/renderer/extensions/vueNodes/components/NodeBoxOverlay.vue
  • src/renderer/extensions/vueNodes/composables/useLowQualityRendering.test.ts
  • src/renderer/extensions/vueNodes/composables/useLowQualityRendering.ts

Comment on lines +317 to +322
function getNodeBoxes() {
const colors = nodeColors.value
return cullingIndex
.entries()
.map((entry) => ({ bounds: entry.bounds!, color: colors.get(entry.id) }))
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🟠 Major | 🏗️ Heavy lift

getNodeBoxes allocates an array of every node on every frame.

NodeBoxOverlay calls getBoxes() once per animation frame through useRafFn. getNodeBoxes calls cullingIndex.entries(), which returns every positioned node in the graph, then .map()s it into a new array of new objects. On a 3000-node graph this allocates 3000 objects and one 3000-element array per frame. drawNodeBoxes then discards the off-screen ones through its own intersects check.

This is the hot path of the low-quality mode, so the allocation cost lands exactly where the PR aims to reduce cost. Return a lazy iterable instead. drawNodeBoxes accepts Iterable<NodeBox> and iterates once, so a generator needs no renderer change.

🐛 Proposed fix
-function getNodeBoxes() {
-  const colors = nodeColors.value
-  return cullingIndex
-    .entries()
-    .map((entry) => ({ bounds: entry.bounds!, color: colors.get(entry.id) }))
-}
+function* getNodeBoxes(): Generator<NodeBox> {
+  const colors = nodeColors.value
+  for (const entry of cullingIndex.entries()) {
+    yield { bounds: entry.bounds, color: colors.get(entry.id) }
+  }
+}

Add import type { NodeBox } from '@/renderer/core/canvas/nodeBoxRenderer'. The entry.bounds access drops its ! once entries() returns the narrowed type proposed in src/renderer/core/spatial/nodeCullingIndex.ts.

A further reduction is to query the index by the current viewport rather than iterating every entry, which would also remove the redundant intersects pass in drawNodeBoxes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/graph/GraphCanvas.vue` around lines 317 - 322, Update
getNodeBoxes to return a lazy Iterable<NodeBox> using a generator instead of
allocating a mapped array for every frame. Import the NodeBox type, yield each
cullingIndex entry with its bounds and color, and remove the non-null assertion
now that entries() provides narrowed bounds; keep drawNodeBoxes unchanged.

Comment on lines +337 to +338
getEntries: () => {
const layouts = layoutStore.getAllNodes().value

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

getAllNodes() builds a throwaway computed and a full layout Map on every rebuild.

layoutStore.getAllNodes() returns a newly constructed ComputedRef on each call (src/renderer/core/layout/store/layoutStore.ts Lines 383-396). Reading .value immediately runs the full O(n) loop that calls yNodeToLayout for every node, and the computed is then discarded, so its cache is never reused.

getEntries runs on every index rebuild. A node drag bumps layoutVersion on each move operation, so each throttle window pays this full materialisation on top of the QuadTree construction. On a 3000-node graph that is a per-rebuild O(n) pass whose only purpose is a lookup by id.

Hoist the computed once, or read each layout individually so only the nodes in rawNodes are materialised.

🐛 Proposed fix
+const allNodeLayouts = layoutStore.getAllNodes()
+
 const cullingIndex = createNodeCullingIndex({
   getVersion: () => layoutStore.layoutVersion,
   getEntries: () => {
-    const layouts = layoutStore.getAllNodes().value
+    const layouts = allNodeLayouts.value
     return rawNodes.value.map((node) => {

Hoisting keeps one computed whose cache is invalidated by version, so repeated rebuilds within the same version cost a cache read instead of a full rescan.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
getEntries: () => {
const layouts = layoutStore.getAllNodes().value
const allNodeLayouts = layoutStore.getAllNodes()
const cullingIndex = createNodeCullingIndex({
getVersion: () => layoutStore.layoutVersion,
getEntries: () => {
const layouts = allNodeLayouts.value
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/graph/GraphCanvas.vue` around lines 337 - 338, Update the
graph indexing setup around getEntries to hoist and reuse a single getAllNodes()
computed outside the callback, then read its cached value when building entries.
Avoid calling layoutStore.getAllNodes() inside each rebuild so the full layout
map is materialized only when layoutVersion invalidates it.

Comment on lines +61 to +64
beforeEach(() => {
vi.useFakeTimers()
Object.assign(camera, { x: 0, y: 0, z: 1 })
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

The test file has no afterEach hook, so two kinds of state persist across tests. beforeEach installs fake timers and the setup helper creates effect scopes, but nothing tears either down. A single afterEach resolves both.

  • src/composables/graph/useViewportCulling.test.ts#L61-L64: add an afterEach that calls vi.useRealTimers() so fake timers do not persist beyond each test.
  • src/composables/graph/useViewportCulling.test.ts#L48-L58: collect the effectScope instances created by setup and stop them in the same afterEach, so watchers bound to the shared module-scope camera do not keep running for the rest of the file.

As per path instructions: docs/testing/vitest-patterns.md states "reset mocks in beforeEach, and restore fake timers in afterEach", and .agents/checks/test-quality.md requires covering "timer, and cleanup cases".

📍 Affects 1 file
  • src/composables/graph/useViewportCulling.test.ts#L61-L64 (this comment)
  • src/composables/graph/useViewportCulling.test.ts#L48-L58
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/composables/graph/useViewportCulling.test.ts` around lines 61 - 64,
Update src/composables/graph/useViewportCulling.test.ts at lines 61-64 and
48-58: track each effectScope created by setup, then add a shared afterEach that
stops those scopes and calls vi.useRealTimers(). Ensure cleanup runs after every
test so watchers and fake timers do not leak.

Source: Path instructions

() => void refreshThrottled()
)

useEventListener(window, 'resize', refreshMountedNodes)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Throttle the resize handler.

The resize event fires in bursts while the user drags the window edge. refreshMountedNodes runs a full spatial query and a pinned-node scan on each call. Reuse refreshThrottled so resize matches the camera path and stays bounded by RECOMPUTE_THROTTLE_MS.

♻️ Proposed change
-  useEventListener(window, 'resize', refreshMountedNodes)
+  useEventListener(window, 'resize', () => void refreshThrottled())
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
useEventListener(window, 'resize', refreshMountedNodes)
useEventListener(window, 'resize', () => void refreshThrottled())
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/composables/graph/useViewportCulling.ts` at line 188, Update the resize
listener in the viewport culling setup to use the existing refreshThrottled
handler instead of refreshMountedNodes, preserving the RECOMPUTE_THROTTLE_MS
limit used by the camera path.

Comment on lines +68 to +75
function intersects(a: Bounds, b: Bounds): boolean {
return !(
a.x + a.width < b.x ||
b.x + b.width < a.x ||
a.y + a.height < b.y ||
b.y + b.height < a.y
)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Compare the existing helper's implementation with the local copy.
rg -n -A 12 'export function boundsIntersect' src/renderer/core/layout/utils/layoutMath.ts

# Find any other duplicate AABB predicates already in the tree.
ast-grep run --pattern 'function $NAME($A: Bounds, $B: Bounds): boolean { $$$ }' --lang typescript src

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 2041


Reuse boundsIntersect from src/renderer/core/layout/utils/layoutMath.ts. It has identical edge semantics, including treating touching edges as intersecting. Removing the duplicate prevents future divergence.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/core/canvas/nodeBoxRenderer.ts` around lines 68 - 75, Update
intersects to reuse the existing boundsIntersect helper from layoutMath.ts
instead of duplicating the overlap logic. Preserve the current edge-inclusive
behavior, including treating touching edges as intersecting, and remove the
local comparison implementation.

Comment on lines +51 to +57
drawNodeBoxes(ctx, getBoxes(), camera, viewportBounds(width, height), {
// Matches the node surface colour so a zoomed-out graph reads the same as
// a zoomed-in one.
defaultColor:
getComputedStyle(el).getPropertyValue('--node-box-color').trim() ||
'#353535'
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

getComputedStyle runs on every animation frame.

useRafFn executes this block at up to 60 Hz. getComputedStyle(el).getPropertyValue('--node-box-color') forces a style resolution on each call. The value comes from the static [--node-box-color:var(--color-zinc-700)] class at Line 70 and does not change at runtime, so the per-frame read is pure overhead in the path this PR optimises.

Resolve the colour once outside the frame loop.

🐛 Proposed fix
+const FALLBACK_NODE_BOX_COLOR = '`#353535`'
+let defaultColor = FALLBACK_NODE_BOX_COLOR
+
+onMounted(() => {
+  const el = canvasRef.value
+  if (!el) return
+  defaultColor =
+    getComputedStyle(el).getPropertyValue('--node-box-color').trim() ||
+    FALLBACK_NODE_BOX_COLOR
+})
+
 useRafFn(() => {
@@
   drawNodeBoxes(ctx, getBoxes(), camera, viewportBounds(width, height), {
     // Matches the node surface colour so a zoomed-out graph reads the same as
     // a zoomed-in one.
-    defaultColor:
-      getComputedStyle(el).getPropertyValue('--node-box-color').trim() ||
-      '`#353535`'
+    defaultColor
   })
 })

Add onMounted to the vue import. If the colour must follow a runtime theme change, recompute it in a watcher on the palette rather than per frame.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
drawNodeBoxes(ctx, getBoxes(), camera, viewportBounds(width, height), {
// Matches the node surface colour so a zoomed-out graph reads the same as
// a zoomed-in one.
defaultColor:
getComputedStyle(el).getPropertyValue('--node-box-color').trim() ||
'#353535'
})
const FALLBACK_NODE_BOX_COLOR = '`#353535`'
let defaultColor = FALLBACK_NODE_BOX_COLOR
onMounted(() => {
const el = canvasRef.value
if (!el) return
defaultColor =
getComputedStyle(el).getPropertyValue('--node-box-color').trim() ||
FALLBACK_NODE_BOX_COLOR
})
useRafFn(() => {
drawNodeBoxes(ctx, getBoxes(), camera, viewportBounds(width, height), {
// Matches the node surface colour so a zoomed-out graph reads the same as
// a zoomed-in one.
defaultColor
})
})
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/extensions/vueNodes/components/NodeBoxOverlay.vue` around lines
51 - 57, Move the --node-box-color resolution out of the useRafFn frame callback
and cache it once during component setup or onMounted, then pass the cached
value as defaultColor to drawNodeBoxes. Add onMounted if needed, preserve the
`#353535` fallback, and only recompute through an appropriate palette/theme
watcher if runtime theme changes must be supported.

Comment on lines +67 to +71
<canvas
ref="canvasRef"
data-testid="node-box-overlay"
class="pointer-events-none absolute inset-0 size-full [--node-box-color:var(--color-zinc-700)]"
/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Mark the decorative canvas as hidden from assistive technology.

The canvas duplicates node rectangles for visual purposes only and is pointer-events-none. It carries no accessible name. Add aria-hidden="true" so assistive technology skips it.

♻️ Proposed change
   <canvas
     ref="canvasRef"
+    aria-hidden="true"
     data-testid="node-box-overlay"
     class="pointer-events-none absolute inset-0 size-full [--node-box-color:var(--color-zinc-700)]"
   />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<canvas
ref="canvasRef"
data-testid="node-box-overlay"
class="pointer-events-none absolute inset-0 size-full [--node-box-color:var(--color-zinc-700)]"
/>
<canvas
ref="canvasRef"
aria-hidden="true"
data-testid="node-box-overlay"
class="pointer-events-none absolute inset-0 size-full [--node-box-color:var(--color-zinc-700)]"
/>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/extensions/vueNodes/components/NodeBoxOverlay.vue` around lines
67 - 71, Add aria-hidden="true" to the decorative canvas element identified by
data-testid="node-box-overlay" in NodeBoxOverlay.vue, leaving its existing
rendering and pointer-events attributes unchanged.

Comment on lines +16 to +37
describe('getLowQualityThreshold', () => {
it('matches the zoom at which text hits the minimum readable size', () => {
setDpr(1)

// NODE_TEXT_SIZE is 14, so 14px text renders at 7px once zoomed to 0.5.
expect(getLowQualityThreshold(7)).toBeCloseTo(0.5, 5)
})

it('lets higher-DPI displays stay detailed longer', () => {
setDpr(1)
const at1x = getLowQualityThreshold(8)
setDpr(4)
const at4x = getLowQualityThreshold(8)

// sqrt(4) = 2, so the threshold halves rather than quartering.
expect(at4x).toBeCloseTo(at1x / 2, 5)
})

it('reports no threshold when LOD is disabled', () => {
expect(getLowQualityThreshold(0)).toBe(0)
})
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for the useLowQualityRendering watcher.

The tests cover only getLowQualityThreshold. The composable's watcher performs the side effects that matter: it clears pendingSlotSync and calls setDirty. Neither branch is tested, which is why the missing high-quality transition flagged in src/renderer/extensions/vueNodes/composables/useLowQualityRendering.ts Lines 45-52 went unnoticed.

Add tests that drive camera.z across the threshold and assert the resulting layoutStore and canvas state in both directions.

As per coding guidelines: "Write tests for code changes, especially bug fixes, to prevent regressions."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/extensions/vueNodes/composables/useLowQualityRendering.test.ts`
around lines 16 - 37, Add tests for the useLowQualityRendering watcher, driving
camera.z across getLowQualityThreshold in both low- and high-quality directions.
Assert that each transition updates layoutStore.pendingSlotSync appropriately
and invokes the canvas setDirty side effect, covering the high-quality
transition that is currently untested.

Source: Coding guidelines

Comment on lines +23 to +28
export function getLowQualityThreshold(minFontSize: number): number {
if (minFontSize <= 0) return 0

const dprAdjustment = Math.sqrt(window.devicePixelRatio || 1)
return minFontSize / (LiteGraph.NODE_TEXT_SIZE * dprAdjustment)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Locate litegraph's own low-quality threshold computation.
rg -n -C 10 'updateLowQualityThreshold|low_quality|min_font_size_for_lod' src/lib/litegraph/src

# Confirm the NODE_TEXT_SIZE constant used by both paths.
rg -n -C 2 'NODE_TEXT_SIZE\s*[:=]' src/lib/litegraph/src

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 35520


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- helper ---'
cat -n src/renderer/extensions/vueNodes/composables/useLowQualityRendering.ts | sed -n '1,80p'
printf '%s\n' '--- threshold usages and setting validation ---'
rg -n -C 4 'getLowQualityThreshold|min_font_size_for_lod' src

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 12513


Align the LOD guard with LGraphCanvas.updateLowQualityThreshold.

The threshold formula matches, but the helper uses minFontSize <= 0 while LGraphCanvas checks === 0. Use the same guard or validate negative values consistently to preserve the documented parity.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/extensions/vueNodes/composables/useLowQualityRendering.ts`
around lines 23 - 28, Update getLowQualityThreshold to use the same zero-value
guard as LGraphCanvas.updateLowQualityThreshold, or otherwise apply consistent
negative-value validation in both paths; preserve the shared threshold formula
and documented parity.

Comment on lines +45 to +52
watch(
isLowQuality,
(lowQuality) => {
if (lowQuality) layoutStore.setPendingSlotSync(false)
canvas.value?.setDirty(true, true)
},
{ immediate: true }
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check whether slot tracking measures on mount without an explicit request.
ast-grep outline src/renderer/extensions/vueNodes/composables/useSlotElementTracking.ts --items all

# Find every writer of pendingSlotSync to confirm the expected lifecycle.
rg -n -C 6 'setPendingSlotSync|pendingSlotSync' src

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 19004


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- useLowQualityRendering.ts ---'
cat -n src/renderer/extensions/vueNodes/composables/useLowQualityRendering.ts
printf '%s\n' '--- useSlotElementTracking.ts (mount, request, flush, composable) ---'
sed -n '1,145p' src/renderer/extensions/vueNodes/composables/useSlotElementTracking.ts
sed -n '250,340p' src/renderer/extensions/vueNodes/composables/useSlotElementTracking.ts
printf '%s\n' '--- GraphCanvas transition watcher ---'
sed -n '350,395p' src/components/graph/GraphCanvas.vue
printf '%s\n' '--- low-quality usage and Vue node rendering ---'
rg -n -C 5 'useLowQualityRendering|isLowQuality|v-if=.*low|lowQuality' src/renderer/extensions/vueNodes src/components/graph | head -n 240

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 22062


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- slot tracking cleanup ---'
sed -n '330,405p' src/renderer/extensions/vueNodes/composables/useSlotElementTracking.ts
printf '%s\n' '--- LGraphNode slot tracking usage ---'
rg -n -C 8 'useSlotElementTracking' src/renderer/extensions/vueNodes
printf '%s\n' '--- GraphCanvas setup order and template conditions ---'
sed -n '60,105p' src/components/graph/GraphCanvas.vue
sed -n '285,335p' src/components/graph/GraphCanvas.vue
printf '%s\n' '--- transition-related tests ---'
rg -n -C 8 'low quality|LowQuality|pendingSlotSync|requestSlotLayoutSyncForAllNodes' src/renderer/extensions/vueNodes src/components/graph --glob '*test*'

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 36986


🏁 Script executed:

#!/bin/bash
set -e
python3 - <<'PY'
from pathlib import Path
import re

low_quality = Path(
    'src/renderer/extensions/vueNodes/composables/useLowQualityRendering.ts'
).read_text()
graph_canvas = Path('src/components/graph/GraphCanvas.vue').read_text()
tracking = Path(
    'src/renderer/extensions/vueNodes/composables/useSlotElementTracking.ts'
).read_text()

assert 'v-for="nodeData in isLowQuality ? [] : allNodes"' in graph_canvas
assert 'layoutStore.deleteSlotLayout(slotKey)' in tracking
assert 'onMounted(() =>' in tracking
assert 'scheduleSlotLayoutSync(nodeId)' in tracking
assert 'if (lowQuality) layoutStore.setPendingSlotSync(false)' in low_quality
assert 'setPendingSlotSync(true)' not in low_quality

watch_body = re.search(
    r'watch\(\s*isLowQuality,\s*\((.*?)\)\s*=>\s*\{(.*?)\n\s*\},',
    low_quality,
    re.S,
)
assert watch_body, 'low-quality watcher not found'
parameters, body = watch_body.groups()

print('low-quality node list is empty:', True)
print('slot unmount deletes cached layouts:', True)
print('slot mount schedules a layout sync:', True)
print('watcher clears pending sync on low-quality:', 'setPendingSlotSync(false)' in body)
print('watcher restores pending sync on high-quality:', 'setPendingSlotSync(true)' in body)
print('watcher receives previous value:', ',' in parameters)
PY

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 425


Re-enable slot synchronization when leaving low-quality mode.

When isLowQuality changes from true to false, set pendingSlotSync to true before Vue remounts the nodes. Low-quality mode removes slot layouts, and remounted slots need a fresh measurement before links render. Guard this branch with the previous watcher value so the immediate high-quality run does not trigger an unnecessary sync. Add a regression test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/extensions/vueNodes/composables/useLowQualityRendering.ts`
around lines 45 - 52, Update the isLowQuality watcher to detect the
true-to-false transition using its previous value and set
layoutStore.pendingSlotSync to true before remounting; preserve the immediate
high-quality run without triggering synchronization, while retaining the
existing low-quality reset and canvas dirtiness behavior. Add a regression test
covering the transition and pending-slot synchronization.

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.68182% with 51 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../extensions/vueNodes/components/NodeBoxOverlay.vue 0.00% 24 Missing ⚠️
src/components/graph/GraphCanvas.vue 41.17% 20 Missing ⚠️
src/renderer/core/spatial/nodeCullingIndex.ts 94.33% 3 Missing ⚠️
src/renderer/core/layout/store/layoutStore.ts 50.00% 2 Missing ⚠️
...r/extensions/minimap/data/LayoutStoreDataSource.ts 33.33% 2 Missing ⚠️
@@            Coverage Diff             @@
##             main   #15016      +/-   ##
==========================================
- Coverage   78.69%   78.60%   -0.09%     
==========================================
  Files        1864     1874      +10     
  Lines      115461   116938    +1477     
  Branches    33553    35143    +1590     
==========================================
+ Hits        90864    91922    +1058     
- Misses      24055    24462     +407     
- Partials      542      554      +12     
Flag Coverage Δ
unit 72.50% <80.68%> (+0.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/composables/graph/useViewportCulling.ts 100.00% <100.00%> (ø)
src/renderer/core/canvas/nodeBoxRenderer.ts 100.00% <100.00%> (ø)
...derer/extensions/minimap/composables/useMinimap.ts 89.47% <100.00%> (ø)
.../extensions/minimap/composables/useMinimapGraph.ts 100.00% <100.00%> (ø)
...tensions/minimap/data/AbstractMinimapDataSource.ts 95.74% <100.00%> (+0.39%) ⬆️
...rer/extensions/minimap/data/LiteGraphDataSource.ts 100.00% <100.00%> (ø)
...xtensions/minimap/data/MinimapDataSourceFactory.ts 100.00% <100.00%> (ø)
...ons/vueNodes/composables/useLowQualityRendering.ts 100.00% <100.00%> (ø)
src/renderer/core/layout/store/layoutStore.ts 82.03% <50.00%> (-0.24%) ⬇️
...r/extensions/minimap/data/LayoutStoreDataSource.ts 76.47% <33.33%> (-3.53%) ⬇️
... and 3 more

... and 70 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@benjcooley

Copy link
Copy Markdown
Collaborator Author

Landed as the suggested split: #15029 (minimap) → #15030 (culling) → #15031 (LOD), stacked in that order.

pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Aug 14, 2026
)

## Summary
The minimap re-derived its entire picture every animation frame — an
O(n²) node scan, `JSON.stringify` over all links, and several full
rebuilds of the layout map from Yjs — costing CPU continuously even
while idle.

## Changes
- **What**: Change detection moved from per-frame RAF to a 100ms
interval; the O(n²) `_nodes.find` per layout entry replaced with the
graph's own id index; per-node strings and link `JSON.stringify`
replaced with allocation-free rolling digests; data sources memoize
`getNodes()` per render pass; new `layoutStore.nodeCount` /
`layoutVersion` / `nodeGeometryVersion` accessors avoid rebuilding the
full layout map for count and staleness checks.
- Detection is keyed on `nodeGeometryVersion` (bumped only when a node
is added/removed or its position/size/bounds is written) rather than the
operation counter, so `setNodeZIndex` — one per widget pointerdown — and
reroute drags no longer force a rebuild and redraw. Backed by
`observeDeep`, so it also covers remote changes arriving via
`applyUpdate`.
- Polling is gated on document visibility (a tab hidden at mount never
starts the loop) and on having a canvas to draw into; two of the three
`useMinimap()` call sites have none.
- Removed a dead `watch(layoutStoreVersion)` and the `getVersion()` it
was the last caller of — it returned a `ComputedRef` over a plain field
and could never fire.

## Measurements
Per-tick cost of change detection, benchmarked by @christian-byrne
during review:

| nodes | before | after |
| ----: | -----: | ----: |
| 245   | 0.343 ms | 0.0105 ms |
| 2500  | 22.4 ms  | 0.101 ms  |

Attribution at 2500 nodes: the `getNodeById` fix is 12.8x and the only
asymptotic term, the digest 17x, RAF→interval 6x.

`performance.spec.ts` `minimap idle` (245 nodes, TBT) runs on every push
of this branch via `ci-perf-report.yaml`, with the comparison posted by
`pr-report.yaml` — that's the CI-visible number for this change.

## Review Focus
- Digest collisions are possible in principle (would drop one refresh,
self-correcting on the next change) — accepted as the minimap is an
approximate overview. Non-finite values coerce per term, so one NaN
cannot mask other movement.
- The link digest hashes endpoints and slots, not just count, so a
same-count rewire still triggers a redraw.
- Known follow-up (FE-1557): threading a single data source through
`updateMinimap` (three builds per pass → two), and wrapping the
composable's watchers in an `effectScope` so `destroy()` tears them
down.

Split from Comfy-Org#15016 (part 1 of 3).

---------

Co-authored-by: github-actions <github-actions@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant