perf(scrollback): reduce multipliers to lower memory baseline#4751
Merged
gregpriday merged 2 commits intodevelopfrom Apr 1, 2026
Merged
perf(scrollback): reduce multipliers to lower memory baseline#4751gregpriday merged 2 commits intodevelopfrom
gregpriday merged 2 commits intodevelopfrom
Conversation
- Reduce agent terminal multiplier from 2.5x to 1.5x - Reduce regular terminal multiplier from 0.5x to 0.3x - Update unit test assertions and comments to match new values - Update E2E flood test buffer bound from 600 to 400
- Update missed E2E test core-terminal-scrollback.spec.ts for 0.3x multiplier - Fix doc comment describing terminal scrollback percentage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
At 160 columns each scrollback line costs ~1.5-2KB. With 12 terminals mostly running agents, the old 2.5x multiplier was adding 50-60MB across processes just in scroll buffers. The new values still exceed VS Code's 1000-line default while being a lot more memory-conscious. Users who need deeper history can bump the base scrollback setting.
Resolves #4743
Changes
src/utils/scrollbackConfig.ts— updated multiplier constantssrc/services/terminal/__tests__/TerminalInstanceService.scrollback.test.ts— updated assertionssrc/services/terminal/__tests__/TerminalScrollbackController.test.ts— updated assertionse2e/full/core-output-flood.spec.ts— updated expected scrollback valuese2e/full/core-terminal-scrollback.spec.ts— updated expected scrollback valuesTesting
Unit tests pass against the new multiplier values. E2E scrollback and output flood specs updated to reflect the reduced limits.