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

low stdout performance with many writes #41808

Closed
ivanjaros opened this issue Oct 6, 2020 · 2 comments
Closed

low stdout performance with many writes #41808

ivanjaros opened this issue Oct 6, 2020 · 2 comments

Comments

@ivanjaros
Copy link

@ivanjaros ivanjaros commented Oct 6, 2020

I was watching one of Jonathan Blow's videos on youtube where he mentioned how slow the CLI became over the years and how printing a dumb text on the screen is slower than rendering 60 frames of AAA game(not his words). And that resonated with me because I have observed this behavior myself many times now when I have a ton of writes into stdout the cli is just incredibly slow/laggy so I usually avoid it. I think this is because there is some kind of slow buffer in the background that batches the writes and somehow makes stdout slow or, most likely, it is a rendering issue. So I was wondering if this could be "fixed" in Go somehow or if this is a OS issue where the OS makes the CLI slow? If so, I was wondering if we could use some kind of simple built-in 2d/3d engine to render the console ourselves instead of the OS provided CLI?

@ALTree
Copy link
Member

@ALTree ALTree commented Oct 6, 2020

Definitely an issue on the CLI-side of things. Some terminal emulators are in fact so slow that piping commands with a lot of output to /dev/null will speed up the command. Not something that can be fixed on the programming language side.

@ALTree ALTree closed this Oct 6, 2020
@ivanjaros
Copy link
Author

@ivanjaros ivanjaros commented Oct 6, 2020

it's quite sad that we just accept this as being normal. seems that OS devs are slacking off. ah well...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.