-
Notifications
You must be signed in to change notification settings - Fork 168
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
High CPU usage on Windows 10 non-legacy mode, related to Select All freeze method #53
Comments
rprichard
added a commit
that referenced
this issue
Jun 7, 2016
Additionally, if it is impossible to fit the entire screen buffer on the current monitor, detect this condition uising the GetLargestConsoleWindowSize API and make the console window as large as possible. This is suboptimal for full-screen console programs (e.g. Far Manager), but because the scrolling-mode scraper scrapes the screen buffer rather than the visble window, the smaller-than-desired window frequently has no noticeable effect. Revert the use of MARK to freeze the new Windows 10 console. Use SELECT_ALL again. Fixes #61 Fixes #79 Breaks #53 again
rprichard
added a commit
that referenced
this issue
Jun 7, 2016
Additionally, if it is impossible to fit the entire screen buffer on the current monitor, detect this condition uising the GetLargestConsoleWindowSize API and make the console window as large as possible. This is suboptimal for full-screen console programs (e.g. Far Manager), but because the scrolling-mode scraper scrapes the screen buffer rather than the visble window, the smaller-than-desired window frequently has no noticeable effect. Revert the use of MARK to freeze the new Windows 10 console. Use SELECT_ALL again. Fixes #61 Fixes #79 Breaks #53 again
Using Mark didn't actually work -- it interfered with the cursor position and could result in garbage on the screen. While I was working on automatic font resizing, it was convenient to revert this fix, so this issue is open again on the master branch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I notice about a 10-12% idle CPU consumption in my Windows 10 VM, non-legacy mode, once the 3000-line screen buffer has filled up. It appears to result from winpty's use of "Select All" to freeze console output.
I suspect it can be fixed by using "Mark" instead of "Select All". winpty used to use Mark, but it had the side-effect of temporarily moving the cursor to the top-left, which IIRC broke some Cygwin programs. (The program was probably reading the cursor position.) The new Mark behavior doesn't appear to do this, though, so maybe it will be OK.
If not, the WinEvents API should help. (#46)
The text was updated successfully, but these errors were encountered: