-
Notifications
You must be signed in to change notification settings - Fork 16
Performance Improvements #87
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
base: master
Are you sure you want to change the base?
Performance Improvements #87
Conversation
76423af to
bee9f1e
Compare
|
Hello ! Thanks a lot for this PR, it is really appreciated! At first glance, most commits will be merged. I just need to check the one combining all I'm quite busy at work right now but I will soon merge this. Feel free to open new PRs with other improvements, these are always welcome ! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #87 +/- ##
==========================================
+ Coverage 34.31% 34.35% +0.04%
==========================================
Files 57 57
Lines 12620 12631 +11
==========================================
+ Hits 4330 4340 +10
- Misses 8252 8253 +1
Partials 38 38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I have not noticed any changes so far with the |
|
No need to remove this commits. Will tackle this in a week. Try your luck if you want ! |
Thanks again for this great readline library. One issue I noticed is that there was some slowness, which is especially noticeable when pasting text on slower terminals such as the GNOME Terminal.
I spent a little time trying to improve this; below are descriptions of each commit. If this PR is accepted and you are open to it, I will try to implement additional improvements in the future.
minimize allocs in line.go: Change core line buffer operations to not allocate in the default case (only if more space is needed)preallocate capacity for slices: Pre-allocate the slices to a known capacity inmatchBindadd DisplayLine test cases: Write a unit test forDisplayLinecombine DisplayLine prints: UpdateDisplayLineto make a singlefmt.Printcallbracketed paste: Support bracketed paste mode so that pastes do not cause a display refresh - this is the main performance improvement for pastes just because it skips the refresh, but the other commits should make the library feel a little more responsive as well