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

Write plain text in chunks #56

Merged
merged 1 commit into from Sep 25, 2021
Merged

Write plain text in chunks #56

merged 1 commit into from Sep 25, 2021

Conversation

secDre4mer
Copy link
Contributor

Instead of writing each byte alone to the console, always write the
full plain text up to the next escape sequence or until the write
is finished.
Doing so means more copying around of bytes, but improves write
performance significantly.

In a short test (writing 20000 lines to a console), time to write all lines went down by ~50%.

@mattn
Copy link
Owner

mattn commented Sep 20, 2021

Could you please rebase master?

Instead of writing each byte alone to the console, always write the
full plain text up to the next escape sequence or until the write
is finished.
Doing so means more copying around of bytes, but improves write
performance significantly.
@secDre4mer
Copy link
Contributor Author

Sure, done.

@mattn mattn merged commit 6a118b2 into mattn:master Sep 25, 2021
@mattn
Copy link
Owner

mattn commented Sep 25, 2021

Thank you

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

Successfully merging this pull request may close these issues.

None yet

2 participants