Skip to content

Implement backpressure #106

@FlipB

Description

@FlipB

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_str when 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%.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-outputOutput displayedA: perfPerformance improvementsO-dynamicDynamic outputS: verticalVertical scrolling

    Projects

    Status

    Todo ✔️

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions