-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Muffle updates to the cursor position to 1/~100ms #5289
Conversation
This stops us from dispatching back-to-back terminal cursor position updates to the TSF control before it has a chance to get back to us. Fixes #5288.
I still wanted it to be named "tuned mass damper" but fine. Let's do this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this 😅
We still dispatch about 60 of them printing the entire 6MB file, but that's a 100000000000000000% reduction and the UI remains fully responsive. |
Alright, i switched this from a mutex to an atomic -- it's cheaper and the platform cannot deny us. I also took some measurements. For a .070-second run of trace logging from that 6MB file: We tried to notify TSF 19798 times, and we successfully notified it 14 times. We can probably do better than "notify 14 times in 7 hundredths of a second" |
After damping, i got it down to 502 cursor updates for the entire file print. |
e8f95d2
to
93a2995
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me, seems to muffle harder
Hey I'm just seeing this now in the morning, but @greg904 had a great little throttle helper over in |
This stops us from dispatching back-to-back terminal cursor position
updates to the TSF control before it has a chance to get back to us.
Fixes #5288
This was tested live with the 6MB repro file from "Terminal Not Speed Enough".