-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Terminal draws are taking very long on some environments #36913
Comments
@jm-mwi what's in your settings.json file? Do you have a particularly small font size and/or |
@Tyriar, I also ran into the same problem. It seems to have started only in 1.17, though it might have resulted from some unrelated changes in my configuration. Version: 1.17.2 {
"editor.fontFamily": "Fira Code Retina",
"editor.fontLigatures": true,
"editor.fontSize": 15,
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"window.zoomLevel": 0,
"workbench.activityBar.visible": false,
} My monitor resolution is 3840x2160 and system-wide scaling is 150%. Reproduction steps:
In Task Manager I see that VSCode process taking ~1 CPU core and System process taking from 1 to 2 cores. I also ran into a similar though less severe issue on Linux, with the similar settings of VSCode, and monitor 2560x1600. |
A couple of additional observations:
|
@eterevsky do you know if GPU acceleration is disabled somehow? For example do you use |
@Tyriar, no I haven't disabled GPU acceleration. Attaching a screenshot of the profiler in Developer Tool. |
@Tyriar, here are my settings as it relates to text... {
"workbench.iconTheme": "material-icon-theme",
"editor.lineHeight": 24,
"editor.fontSize": 15,
"editor.fontFamily": "Hasklig, Monoid, Fira Code",
"editor.fontLigatures": true,
"editor.minimap.enabled": true,
"editor.minimap.maxColumn": 200,
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"editor.minimap.showSlider": "always",
"window.zoomLevel": 1,
"editor.minimap.renderCharacters": false
} |
@eterevsky thanks for the screenshot 😃 something about your environment is drawing from |
@Tyriar It's an up-to-date 64-bit Windows 10. VSCode version: 1.17.2. Later today I can try to connect a Macbook to a 4K monitor, to see whether it's reproducible on another OS. I don't experience any slowness in the editor panes, it's specific to the terminal. |
All related reports for this problem seem to be on Windows 10. |
Yep. Tried to reproduce on macOS, but everything worked smoothly. If you point me to a 1.16 installer, I can check, whether it's a new bug in 1.17. |
@eterevsky no need, it's new with these changes: https://code.visualstudio.com/blogs/2017/10/03/terminal-renderer |
Just dropping my 2 cents in here to say I seem to have the same issue. I've got a couple of Webpack builds, and one of them seems to cause this reasonably often. Everything locks up for a few seconds, on and off, especially when scrolling. I too am running windows 10 64-bit with VSCode 1.17.2. I profiled while it was happening. Here's a lil' screenshot of what I guess is causing it, and I can provide the profiler file too, but it's a cool 33meg. |
I've noticed this only seems to happen on my high DPI laptop. If VSCode is open on the same laptop, but displaying on a 1920x1080 screen, I no longer seem to have any issues. |
Hi! Is there any update on this issue? For me it makes VSCode terminal completely unusable in my preferred workflow, and I have to use external terminals, even though I really like the idea of a console in a VSCode pane. |
@eterevsky I'm still not sure what the root cause is unfortunately. I have had reports of slow drawing when the terminal has certain styling, particularly when most of the terminal has a different background color or is using true color. Is anyone's terminal doing this during the slow down? (see vercel/hyper#2592) |
I'm using Ubuntu 16.04 x86_64 and I'm seeing the same problem with 1.20.1. I also have a 4k HiDPI display with 125% font scaling. Done by the DE for the menus and stuff. Other font sizes (maybe due to another bugs) is done for the terminal and editor through prefs.
When the terminal windows is not maximized it works perfectly fine. If I un-maximize it performance returns to normal. I can toggle back and forth between maximized and normal and the perf issue comes and goes between states as described. |
Same for me as for @zeroepoch . I am on Ubuntu 17.10. Desktop gnome 3.26.2. VSCode 1.20.1. Terminal becomes very slow when I maximaze it. After I unmaximzed it is working perfectly. My laptop display has 4k resolution (3840x2160) and at 200% scale. Hope my info helps. |
@Tyriar Exactly the same issue happens on Linux. VSCode 1.21. Here's a screenshot of the profiler: It's a pity, since I really like VSCode terminal, and this bug makes it unusable for me both on Windows and on Linux. |
@eterevsky do you experience the issue on the same machine on Windows/Linux with dual booting by chance? Can you provide details on your GPU? |
@Tyriar Those are two different computers. The Windows machine has nVidia GTX 1080, the Linux machine has nVidia Quadro K620. |
@eterevsky and you're not setting --disable-gpu when you launch code right? |
@eterevsky opps, too many notifications 😛. Could you try reproduce when launching with this?
|
@Tyriar Sorry for the delay. I tried it on my Linux machine, and it worked in exactly the same way as before, i.e. very slow. It's also reproducible when the terminal is split (a new VSCode feature). It's also reproducible when the window is not completely maximized, but still fills most of the screen. It does not happen when the terminal covers less than ~1/3 or ~1/4 of the screen space. If seems that there is a certain threshold of the number of characters or pixels: while the terminal is below this threshold it works completely fine, and once past this threshold it chokes for seconds after each character or line. |
Just want to chime in again to say that @eterevsky s comments are very consistent with my experience on windows too. There does seem to be a threshold at about a quarter or third of the screen space were the issue first appears, and it mostly only presents on my high DPI screen so my guess is it's more about pixels them characters. It also doesn't seem as bad if the side bar is open, which one again reduces the actual screen space being drawn to by the terminal. I tried to reproduce the issue in the xtermjs demo on Chrome the other day to see whether it would also choke when drawing lots of characters in a large terminal; but I couldn't seem to get it to maximise properly, even with their full screen plugin. It looked full screen, but would only actually draw characters to the same small section. I could have another go if that seems like it could be helpful, or if someone with more experience with xterm could help me set up in a similar way to how vscode uses it. |
@franklin-ross in the xterm.js demo you can increase the size of the viewport by setting the cols and rows in the textboxes at the bottom. |
I see. Thanks @Tyriar, I'll give it another go this long weekend and see what comes out of it. |
I created #46954 to provide a fallback when canvas GPU acceleration is turned off. |
When running as |
Ok I have some good news, I cannot reproduce this slowness on our build that's on Electron v2/Windows 10 which will likely hit stable in v1.23. It would be great if I could get some people to verify those who have been experiencing the issue. Here's the build https://az764295.vo.msecnd.net/exploration/3ff48e575e04e31a0e4645656c18f43047444bad/VSCode-win32-x64-1.23.0-exploration.zip Something else that puts more weird behind this thinking is that I can't reproduce the slowness when I run the terminal under Chrome 65. |
@Tyriar That exploration build does not exhibit the problem, works fine for me. |
@Tyriar Great! The new build works fine for me as well, even scrolling is pretty smooth. Thanks! |
@dkent600 @eterevsky awesome! I'll close this off then for the April release. There are some more performance improvements to come, but I'm glad this issue is solved. |
@Tyriar I just installed version 1.23.0, and the issue is still present. Could you tell me, in which release is it expected to be fixed? |
@eterevsky It's being improved when we bring in Electron 2 which was pushed out from April (will probably be June). I'm not tracking this class of issues in #46954 |
@eterevsky If you get the Insiders edition, I'm pretty sure the problem is gone. |
This happened to me on my laptop (4K screen size) where I turned off external GPU unit and instead was using integrated intel gpu. Terminal was consumig a lot of integrated GPU power thus whole IDE was hanging. Switching to insiders edition didn't help for the same reason. |
(1 theme extensions excluded)
Steps to Reproduce:
Reproduces without extensions: (disabling extensions improves performance, but it is still "slow")
The text was updated successfully, but these errors were encountered: