Skip to content

Don't redraw the status line every time when a batch of output occurs at once #9

@jwodder

Description

@jwodder

If the child process emits a large number of output lines at once, elapsed will currently clear & redraw the status line before & after each & every one. Better handling of such situations is needed.

  • Possible solution: Split the select-loop into two tasks in a multi-threaded runtime. Task one uses a select-loop to receive ticks & subprocess events, and then it sends them through a channel to task two. Task two calls Receiver::recv().await in a loop, and each time this future completes, it clears the status line, processes the event, and then loops over Receiver::try_recv() — processing any more events received in quick succession — until it returns Empty, and only after that is the status line redrawn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededperformanceEfficient use of time and spaceunder considerationDev has not yet decided whether or how to implement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions