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 should probably buffer #72

Open
tbu- opened this issue Apr 8, 2017 · 0 comments
Open

Terminal should probably buffer #72

tbu- opened this issue Apr 8, 2017 · 0 comments

Comments

@tbu-
Copy link

tbu- commented Apr 8, 2017

It would be good if the terminal types could have built-in buffering, preferably line-buffering. Currently, every write call in a formatter directly causes a syscall, slowing terminal output down. Additionally, there's no need to flush after every color code on ANSI terminals, it would be more efficient to output them together with the actual text.

In slog-rs/slog#125 you can see that it causes a more than 2x speedup to simply put a LineBuffer around the terminal. On Windows, this would also need to include a flush before the terminal properties are changed to output in a different color.

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

No branches or pull requests

1 participant