forked from magiblot/tvision
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux: use an event queue in THardwareInfo
It turns out that the slugginess experienced when dragging the mouse quickly and showing lots of data is not caused by performance issues in the I/O functions, but because events are being received at a faster rate than they are processed. A possible solution is to have a small queue of events and read as many events as possible in a non-blocking way before going the blocking way. This will give results when there are lots of input events, e.g. because the user is moving the mouse aggresively or text has been pasted into the terminal. If we then avoid flushing the screen or reading more events until the queue is empty, these events are processed with a considerably lower latency. This is probably the most important performance improvement in this project up to now. Fixes cosmos72/twin/magiblot#61.
- Loading branch information
Showing
2 changed files
with
54 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters