Measured in the 2026-09-20 long-session benchmark: the chat surface runs debug.SetGCPercent(400) at cmd/codeaf/main.go:142 (a documented render-latency trade, main.go:55-65). A flat 4-5 MB live heap then carries a ~28 MB heap goal, and RSS grows 10-15 MB over 100 turns that has nothing to do with retained data.
A/B, same 25-turn session: RSS 67.6 MB at GOGC=400 vs 49.2 MB at GOGC=100, live heap identical (gctrace). ~18 MB of RSS from one constant.
Proposal: lower the surface GOGC to 100 or 200, or make it adaptive. Before shipping, rerun the first-paint and scroll perf gate, since the 400 exists to protect render latency.
—
Drafted with CodeAF · reviewed and owned by the author
Measured in the 2026-09-20 long-session benchmark: the chat surface runs
debug.SetGCPercent(400)atcmd/codeaf/main.go:142(a documented render-latency trade, main.go:55-65). A flat 4-5 MB live heap then carries a ~28 MB heap goal, and RSS grows 10-15 MB over 100 turns that has nothing to do with retained data.A/B, same 25-turn session: RSS 67.6 MB at GOGC=400 vs 49.2 MB at GOGC=100, live heap identical (gctrace). ~18 MB of RSS from one constant.
Proposal: lower the surface GOGC to 100 or 200, or make it adaptive. Before shipping, rerun the first-paint and scroll perf gate, since the 400 exists to protect render latency.
—
Drafted with CodeAF · reviewed and owned by the author