The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
perf(tui): skip cached rounding subtrees before descent
fangliquanb363fee510a0
diff --git a/ui-tui/packages/hermes-ink/src/native-ts/yoga-layout/index.ts b/ui-tui/packages/hermes-ink/src/native-ts/yoga-layout/index.tsindex 5e954e99030..2333931237e 100644--- a/ui-tui/packages/hermes-ink/src/native-ts/yoga-layout/index.ts+++ b/ui-tui/packages/hermes-ink/src/native-ts/yoga-layout/index.ts@@ -979,13 +979,6 @@ function layoutNode(if (performLayout) {node._rLayoutGen = _generation-- let ancestor: Node | null = node-- while (ancestor && ancestor._rSubtreeLayoutGen !== _generation) {- ancestor._rSubtreeLayoutGen = _generation- ancestor = ancestor.parent- }}const style = node.style@@ -1056,6 +1049,15 @@ function layoutNode(}}+ if (performLayout) {+ let ancestor: Node | null = node++ while (ancestor && ancestor._rSubtreeLayoutGen !== _generation) {+ ancestor._rSubtreeLayoutGen = _generation+ ancestor = ancestor.parent+ }+ }+const wasDirty = node.isDirty_if (performLayout) {diff --git a/ui-tui/packages/hermes-ink/src/native-ts/yoga-layout/round-layout.test.ts b/ui-tui/packages/hermes-ink/src/native-ts/yoga-layout/round-layout.test.tsindex f49d7879675..12f7b359270 100644--- a/ui-tui/packages/hermes-ink/src/native-ts/yoga-layout/round-layout.test.ts+++ b/ui-tui/packages/hermes-ink/src/native-ts/yoga-layout/round-layout.test.ts@@ -74,7 +74,7 @@ describe('incremental layout rounding', () => {expect(clock.getComputedWidth()).toBe(6.5)expect(transcript.getComputedWidth()).toBe(transcriptWidth)expect(counters.rounded).toBeLessThanOrEqual(4)- expect(counters.roundSkips).toBeGreaterThanOrEqual(1)+ expect(counters.roundSkips).toBe(1)root.freeRecursive()Yoga.Config.destroy(config)