From 3a7cc3f548e3b5902c67e723f89383ad9319db48 Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Tue, 9 Sep 2025 20:36:52 -0700 Subject: [PATCH] revert churn reducings from layoutStore.ts --- src/renderer/core/layout/store/layoutStore.ts | 33 +------------------ 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/src/renderer/core/layout/store/layoutStore.ts b/src/renderer/core/layout/store/layoutStore.ts index a9d1a7b81e..ca5d671207 100644 --- a/src/renderer/core/layout/store/layoutStore.ts +++ b/src/renderer/core/layout/store/layoutStore.ts @@ -457,20 +457,6 @@ class LayoutStoreImpl implements LayoutStore { const existing = this.slotLayouts.get(key) if (existing) { - // Short-circuit if nothing changed to avoid spatial index churn - if ( - existing.nodeId === layout.nodeId && - existing.index === layout.index && - existing.type === layout.type && - existing.position.x === layout.position.x && - existing.position.y === layout.position.y && - existing.bounds.x === layout.bounds.x && - existing.bounds.y === layout.bounds.y && - existing.bounds.width === layout.bounds.width && - existing.bounds.height === layout.bounds.height - ) { - return - } // Update spatial index this.slotSpatialIndex.update(key, layout.bounds) } else { @@ -1456,26 +1442,9 @@ class LayoutStoreImpl implements LayoutStore { const ynode = this.ynodes.get(nodeId) if (!ynode) continue - // Short-circuit when bounds are unchanged to avoid churn - const currentBounds = this.getNodeField(ynode, 'bounds') - const sameBounds = - currentBounds.x === bounds.x && - currentBounds.y === bounds.y && - currentBounds.width === bounds.width && - currentBounds.height === bounds.height - if (sameBounds) continue - this.spatialIndex.update(nodeId, bounds) ynode.set('bounds', bounds) - - // Keep size in sync with bounds - const currentSize = this.getNodeField(ynode, 'size') - if ( - currentSize.width !== bounds.width || - currentSize.height !== bounds.height - ) { - ynode.set('size', { width: bounds.width, height: bounds.height }) - } + ynode.set('size', { width: bounds.width, height: bounds.height }) } }, this.currentActor)