Repository navigation
GPU resources allocated per-surface including hidden/inactive tabs #12034
Issue DescriptionEach Ghostty surface (tab, split) allocates its own full set of GPU resources — framebuffers, renderbuffers, font atlas textures, cell buffers, uniform buffers — even when the surface is not visible (hidden tabs, occluded windows). These resources are never released until the surface is destroyed. For users with many windows and tabs, this leads to significant GPU memory consumption. In my case, 20 windows with multiple tabs result in 674 MiB of VRAM consumed by Ghostty alone. Source Code AnalysisEach
When a surface becomes hidden (non-visible tab), the only optimization is:
But all GPU resources remain allocated. Expected BehaviorHidden/inactive surfaces should release their GPU resources (framebuffers, renderbuffers, per-surface atlas texture copies) when not visible, and reconstruct them on demand when the tab/split becomes active again. The reconstruction delay would be imperceptible (a few ms). Why This MattersThis becomes a real problem when:
Note: In PR #1584, @mitchellh acknowledged this area as a known gap:
Ghostty VersionEnvironment
|
Replies: 2 comments 1 reply
|
Really good find on this, I'm sorry I missed this discussion. I'm working on this. |

#14017