mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
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:
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 |
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user