vscode: Lagging/freezing using VSCode Insiders in Big Sur
- VSCode Version: 1.50.0-insider
- OS Version: Darwin x64 20.1.0
Full version details
Version: 1.50.0-insiderCommit: 403a6895f401c397933ec5c4f7d89432a33509b6
Date: 2020-09-18T07:11:53.303Z (2 days ago)
Electron: 9.3.0
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 20.1.0
Steps to Reproduce:
- Open VSCode
- Start using it with an integrated terminal open
- You will see the lagging occur mainly in the terminal, but sometimes it also seem to happen on the editor or in the search box.
Notes:
-
I probed all the renders for the integrated terminal and nothing has changed.
-
I changed the runtime configuration of Code to add the following line:
"disable-hardware-acceleration": true,
It seems to work a little bit better, but still lagging.
I saw a similar issue here: https://github.com/microsoft/vscode/issues/105446 but in my case it lags in more places than just the terminal.
Does this issue occur when all extensions are disabled?: Yes
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 42
- Comments: 37 (1 by maintainers)
Try this, now my terminal works faster:
codesign --remove-signature /Applications/Visual\ Studio\ Code.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app
and restart your VSCode
I have this problem and have since the Big Sur update. It affects the entire editor, not just the terminal. Currently on 11.0 Beta (20A5395g).
VSCode info: Version: 1.50.1 Commit: d2e414d9e4239a252d1ab117bd7067f125afd80a Date: 2020-10-13T14:53:05.704Z (3 wks ago) Electron: 9.2.1 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Darwin x64 20.1.0
When you press
Enter
in the integrated terminal, a debounced protected event fires in 2 seconds, to grab the current working directory of that terminal. On Mac, this is done by runninglsof ... <terminalPid> | grep cwd
.On macOS Big Sur
child_process.spawn()
locks up the thread for a long time for some unknown reason. It is important to note that it is not that the actual spawned command is taking a long time, but rather the native code within Node.JS to spawn the process is locking up, blocking the thread.So you can consistently see this behavior by pressing enter in the terminal, and then experience a UI stutter around 2 seconds after.
You can play around directly in the developer tools by running the following:
f()
Under normal conditions, you would expect to see
called
printed immediately, sincechild_process.exec
should preempt itself asynchronously. Instead you will probably see it printed after about 1000-1500ms later, indicating that.exec()
itself is taking a long time to run.Again, the bug/regression is deep into Node.JS code, so it’s not clear what VSCode could/should do differently in this case, especially since this bug is only experienced on a macOS beta. A blind guess of mine is that it might be related to some entitlements or gatekeeper related code slowing down the spawning of processes heavily, but I have zero evidence that such would be the case. Furthermore, I have not been able to reproduce this behavior in a Node.JS repl, on both the same version VSCode uses, nor the latest.
I got the same problem. Issue needs to be reopened.
I have this issue also, integrated terminal is glitching and lagging … My normal terminal
iTerm
is working fine.VSCode info: Version: 1.51.1 Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f Date: 2020-11-11T01:11:34.018Z Electron: 9.3.3 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Darwin x64 20.1.0
I have Big Sur final release.
Problem is back after upgrading from Big Sur 11.0.1 to 11.1. Seems like removing the signature again resolves the issue.
Worked for me after I had restarted VS Code.
VSCode literally slows down the entire system in my case. Once I close the app things get back to normal. Other electron apps seem to work OK, for example Trello. I’m running Big Sur 11.0.1 on a Macbook Pro. This issue should be re-opened.
This problem is back after upgrading from Big sur 11.0.1 to 11.1 !!!
Yes I think it should be opened again. I passed to Big Sur recently and didn’t had any problem before.
I don’t think than a solution like removing a signature should be an accepted solution.
Yes, I can confirm that. Should this issue be reopened?
I have the same issue. Freezes between 1-2 seconds, very often on the whole UI.
Mac OS Big Sur 11.0.1
The
codesign --remove-signature
command mentioned earlier fixes the issue for me. And I had to re-run it after I upgraded vscode, the problem is still there.Please re-open the issue.
looks like those problems are because Electron hardware acceleration is broken in Bug Sur (Spotify, VSCode, Postman apps are VERY laggy because it enabled by default)
Petition to reopen this issue, thx.
try to execute the following command then:
VSCode randomly freezes both in editor and terminal during daily use. This issue should be re-opened.
FTR, it worked well for me with the versions I posted above (that’s why I closed the issue), but it is again laggy.
I saw #105446 before creating the issue and I mentioned it in the original post, however, when I created the issue the lag was affecting the editor as well. Nowadays I don’t have that problem anymore, it just affects the terminal.
/duplicate https://github.com/microsoft/vscode/issues/105446
Now I found my own problem reason - there is really mystic macos bug. In my case that lags are only when I use external 2k display (of course in dGPU mode, radeon pro 5500M) with non-standard color profile (downloaded from reddit). When I selected standard profile in macos display settings menu - lags were gone. And then when I tried a reddit profile again - now, no lags too. I don’t understand how color profile changing can broke (and repair) hardware acceleration in v8 apps, but it may be something like hardware DRM side effect (because when that lags were, there were no GPU workload in macos activity monitor while I tried to scroll v8-app window)
I experience the same problem using VS Code with Big Sur (beta 8).
I hope it’s related to the beta phase of Big Sur, and will not be the same on release.
It also happens sometimes while typing, I’m not sure it’s related to that same issue with the terminal, but the freeze feels pretty much the same to me.
After the execution, restart VSCode, the work is very fast