diff --git a/notes/windows-perf-progress.md b/notes/windows-perf-progress.md index acd1f6aad5e..c31c10d243d 100644 --- a/notes/windows-perf-progress.md +++ b/notes/windows-perf-progress.md @@ -30,10 +30,12 @@ Findings (baseline, this machine): ConPTY corruption + perf differences on degraded-mode/fresh-local spawns). Fixes on this branch (PR #7080 merged in — WebGL release on dispose + stale pty:exit synthesis): -- A: WebGL context retention across hide/show (pane-webgl-context-retention.ts, LRU cap 16; - suspend keeps live contexts; resume repaints instead of recreating). Gated to Windows - (getRendererAppPlatform() === 'win32'): macOS/Linux context creation is cheap, so they - keep dispose-on-hide and pay no retention GPU-memory cost. +- A: WebGL context retention across hide/show (pane-webgl-context-retention.ts, LRU cap 32 — + sized for ~10-16 worktrees × ~2 terminals hot sets; suspend keeps live contexts; resume + repaints instead of recreating). Gated to Windows (getRendererAppPlatform() === 'win32'): + macOS/Linux context creation is cheap, so they keep dispose-on-hide and pay no retention + GPU-memory cost. Peer note: at least one comparable product raises the context budget to + 256 and retains unbounded with a session-wide DOM latch on loss; we bound + recover instead. - B: useConptyDll for LocalPtyProvider spawns (local-pty-utils.ts) — parity with daemon. - D: atlas recovery bursts skip suspended panes (scoped to visible); retained panes repaint on resume (shared-atlas invariant preserved). diff --git a/src/renderer/src/lib/pane-manager/pane-webgl-context-retention.ts b/src/renderer/src/lib/pane-manager/pane-webgl-context-retention.ts index fe997b21745..282d57fc5e7 100644 --- a/src/renderer/src/lib/pane-manager/pane-webgl-context-retention.ts +++ b/src/renderer/src/lib/pane-manager/pane-webgl-context-retention.ts @@ -5,8 +5,9 @@ import type { ManagedPaneInternal } from './pane-manager-types' // and recreate it on return — ~5ms on macOS but 100-500ms per pane on Windows // (ANGLE → D3D11), paid synchronously on the switch path. With the app-level // context budget raised to 128 (#7064), hidden panes can keep their contexts; -// this LRU cap only bounds hidden-pane GPU memory. -export const RETAINED_WEBGL_PANE_CAP = 16 +// this LRU cap only bounds hidden-pane GPU memory. Sized for the reported hot +// set (~10-16 worktrees × ~2 terminals) while staying far under the budget. +export const RETAINED_WEBGL_PANE_CAP = 32 /** Windows-only: context re-creation is cheap on macOS/Linux GL, so hidden * panes there keep the long-proven dispose-on-hide behavior instead of