Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminal: buffer the output before sending #11449

Merged
merged 3 commits into from
Jul 27, 2022

Conversation

paul-marechal
Copy link
Member

@paul-marechal paul-marechal commented Jul 21, 2022

In order to not overload the websocket channel opened between the
frontend and the backend we should chunk and buffer the output of
terminals.

Add BufferingStream that will buffer data for some time before
emitting it.

Closes #11181

How to test

Terminals should still work.

Review checklist

Reminder for reviewers

@paul-marechal paul-marechal requested a review from msujew July 21, 2022 17:08
In order to not overload the websocket channel opened between the
frontend and the backend we should chunk and buffer the output of
terminals.

Add `BufferingStream` that will buffer data for some time before
emitting it.
@vince-fugnitto vince-fugnitto added the terminal issues related to the terminal label Jul 21, 2022
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks way cleaner than the previous approach. However, I still notice resource starvation when running on non-local servers.

packages/terminal/src/node/buffering-stream.ts Outdated Show resolved Hide resolved
@paul-marechal paul-marechal force-pushed the mp/buffer-terminal-output branch from b4107a7 to 60ebeca Compare July 22, 2022 17:23
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, looks good to me and cleaner than the other proposed approach 👍

@paul-marechal paul-marechal merged commit 92084ae into master Jul 27, 2022
@paul-marechal paul-marechal deleted the mp/buffer-terminal-output branch July 27, 2022 15:28
@github-actions github-actions bot added this to the 1.28.0 milestone Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
terminal issues related to the terminal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants