aboutsummaryrefslogtreecommitdiffstats
path: root/src/expr.c
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-03 16:26:41 +0200
committeruser <user@clank>2026-09-03 16:26:41 +0200
commite3059676a6b342ea9ff07753d5b976e854d4b111 (patch)
tree0bd6dd5bb7bb95503d116bddc0b7633b46d46de0 /src/expr.c
parentweb: card (diff)
downloadslosh-e3059676a6b342ea9ff07753d5b976e854d4b111.tar.gz
slosh-e3059676a6b342ea9ff07753d5b976e854d4b111.tar.xz
slosh-e3059676a6b342ea9ff07753d5b976e854d4b111.zip
pane: drop the render snapshot of panes on hidden tabs -- 154K -> 66K each
An updated GhosttyRenderState retains a full copy of the pane's viewport (rows, cells, per-row arenas, styles) so renders can read it without the terminal lock. Measured with bpftrace and a lib-vt micro-benchmark, that copy is ~140KB for an 80x24 pane -- more than twice the terminal it mirrors (~57KB) -- and every pane kept one forever, composed or not. Only the current tab is ever composed, so app_compose now drops the snapshot of every pane on the other tabs (a pointer test once dropped), and pane_new no longer creates one at all: pane_compose and pane_select_word build it on first use. Both already begin with ghostty_render_state_update(), so a dropped snapshot is rebuilt, never missed, and the tab switch already forces a full repaint. Server memory per empty 80x24 terminal drops from 154K to 66K anon (Superlogical reports 68K on macOS; tmux 4K, zellij 1.2-6.2M). Fifty background tabs: 8.2M -> 3.8M, reclaimed on close, and cycling through tabs does not ratchet. What remains is the lib-vt terminal itself.
Diffstat (limited to 'src/expr.c')
0 files changed, 0 insertions, 0 deletions