-
Notifications
You must be signed in to change notification settings - Fork 29
Implement backpressure #106
Copy link
Copy link
Open
Labels
A-outputOutput displayedOutput displayedA: perfPerformance improvementsPerformance improvementsO-dynamicDynamic outputDynamic outputS: verticalVertical scrollingVertical scrolling
Metadata
Metadata
Assignees
Labels
A-outputOutput displayedOutput displayedA: perfPerformance improvementsPerformance improvementsO-dynamicDynamic outputDynamic outputS: verticalVertical scrollingVertical scrolling
Projects
Status
Todo ✔️
Is your feature request related to a problem? Please describe.
Minus becomes unresponsive when attempting to page big files (gigabytes).
Describe the solution you'd like
It seems like the pager's buffer is unbounded and keeps growing to attempt to fit the entire input.
Instead the pager ought to limit the buffer to eg. 1000 lines, and block
write_strwhen full.Scrolling the output consumes the buffer, allowing new lines to be written by
write_str.Additional context
It spends virtually all time in
PagerState::append_str, pegging the CPU at 100%.