File: src/server/server.zig:2737-2780 Severity: LOW Status: ✅ FIXED
The code compares pane_border_fmt_str against the session options on every render:
const pane_border_fmt_str = session.options.asString("pane-border-format") orelse "";
for (dc.bounds_buf.items) |*pb| {
if (pane_border_fmt_str.len == 0) {
pb.border_format = "";
continue;
}
// ... expand ...
}
Even when the format string is identical to the previous render, the full expansion runs. With a simple format like “#I” this is cheap but repeated.
Fix: Track a format generation counter on the session. Increment it when pane-border-format changes. Cache the expanded border format per pane keyed by generation. Skip expansion when generation is unchanged.