perf: add CSS contain:layout contain:style to node inner wrapper

Add layout and style containment to the node inner wrapper div in
LGraphNode.vue. This tells the browser it can skip re-layout and
re-style of descendant elements when only external layout changes,
reducing composite/paint overhead in large node graphs.

The outer shell already has contain-layout contain-style; this extends
the same containment to the inner content wrapper for tighter isolation.
This commit is contained in:
bymyself
2026-03-14 23:16:25 -07:00
parent 2af3940867
commit 3efb8713dd
3 changed files with 1 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

@@ -76,7 +76,7 @@
:class="
cn(
'flex flex-1 flex-col border border-solid border-transparent bg-node-component-header-surface',
'w-(--node-width)',
'w-(--node-width) contain-layout contain-style',
!isRerouteNode && 'min-h-(--node-height) min-w-(--min-node-width)',
shapeClass,
hasAnyError && 'ring-4 ring-destructive-background',