Skip to content
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

Lagging/freezing using VSCode Insiders in Big Sur #107103

Closed
agonzalezro opened this issue Sep 20, 2020 · 37 comments
Closed

Lagging/freezing using VSCode Insiders in Big Sur #107103

agonzalezro opened this issue Sep 20, 2020 · 37 comments
Assignees

Comments

@agonzalezro
Copy link

  • VSCode Version: 1.50.0-insider
  • OS Version: Darwin x64 20.1.0
Full version details Version: 1.50.0-insider

Commit: 403a689

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:

  1. Open VSCode
  2. Start using it with an integrated terminal open
  3. 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: #105446 but in my case it lags in more places than just the terminal.

Does this issue occur when all extensions are disabled?: Yes

@davidzech
Copy link

davidzech commented Sep 22, 2020

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 running lsof ... <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:

child_process = require('child_process')
async function f() {
    child_process.exec('echo hi', (a, stdout, err) => console.log(stdout))
    console.log('called')
}

f()

Under normal conditions, you would expect to see called printed immediately, since child_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.

@Tahul
Copy link

Tahul commented Sep 24, 2020

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.

@agonzalezro
Copy link
Author

It seems that it's fixed with the latest Big Sur beta: 11.0 Beta (20A5384c)

Or maybe with the latest VSCode update, but I think that it was fixed just after the Big Sure installation. The Code version I am running is the following:

Version: 1.50.0-insider
Commit: 0ecb64a
Date: 2020-10-02T11:11:09.716Z
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

@matinzd
Copy link

matinzd commented Oct 13, 2020

It seems that it's fixed with the latest Big Sur beta: 11.0 Beta (20A5384c)

Or maybe with the latest VSCode update, but I think that it was fixed just after the Big Sure installation. The Code version I am running is the following:

Version: 1.50.0-insider
Commit: 0ecb64a
Date: 2020-10-02T11:11:09.716Z
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

Maybe it's because of the insider version you are using. I still have this problem even I am on 20A5384c.

@Tyriar
Copy link
Member

Tyriar commented Nov 3, 2020

/duplicate #105446

@agonzalezro
Copy link
Author

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.

@megamaddu
Copy link

megamaddu commented Nov 3, 2020

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: d2e414d
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

@alaadahmed
Copy link

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: e5a624b
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.

@ivands
Copy link

ivands commented Nov 20, 2020

I got the same problem.
Issue needs to be reopened.

@kevin-kelly-centivo
Copy link

I am also experiencing this issue.
MacBook Pro (15-inch, 2019)
Processor: 2.6 GHz 6-Core Intel Core i7
Memory: 16 GB 2400 MHz DDR4
Graphics: Radeon Pro 555X 4 GB
Intel UHD Graphics 630 1536 MB

Most recent version of studio code.

@reinaldo-calderon-team
Copy link

reinaldo-calderon-team commented Nov 22, 2020

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

@gaspo53
Copy link

gaspo53 commented Nov 26, 2020

Same here. The app freezes and you can't do any input. It last about 2-3 seconds.

@jbouganim
Copy link

Same issue
Version: 1.51.1
Commit: e5a624b
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

@kristianpedersen
Copy link

Try this, now my terminal works faster:

codesign --remove-signature /Applications/Visual\ Studio\ Code.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app

Worked for me after I had restarted VS Code.

@egorgam
Copy link

egorgam commented Nov 27, 2020

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)

@WadhahEssam
Copy link

tried everything, still everything is lagging

@imajinyun
Copy link

Try this, now my terminal works faster:

codesign --remove-signature /Applications/Visual\ Studio\ Code.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app

After the execution, restart VSCode, the work is very fast

@egorgam
Copy link

egorgam commented Dec 3, 2020

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)

@yalishizhude
Copy link

codesign --remove-signature /Applications/Visual\ Studio\ Code.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app

I use vscode-insiders, It doesn't work for me because of "invalid option"

codesign --remove-signature /Applications/Visual\ Studio\ Code -\ Insiders.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app

codesign: invalid option --
Usage: codesign -s identity [-fv*] [-o flags] [-r reqs] [-i ident] path ... # sign
       codesign -v [-v*] [-R=<req string>|-R <req file path>] path|[+]pid ... # verify
       codesign -d [options] path ... # display contents
       codesign -h pid ... # display hosting paths

@raduciobanu22
Copy link

raduciobanu22 commented Dec 6, 2020

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.

@peteboothroyd
Copy link

@yalishizhude might not be the root cause but after Code it looks like you're missing an escape before the next space

@hujiayao
Copy link

hujiayao commented Dec 9, 2020

VSCode randomly freezes both in editor and terminal during daily use. This issue should be re-opened.

@FR073N
Copy link

FR073N commented Dec 9, 2020

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.

codesign --remove-signature /Applications/Visual\ Studio\ Code -\ Insiders.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app

@interrobrian
Copy link

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)

THANK YOU! I'm on macOS Catalina and this issue has been plaguing me for days. I would have never guessed it was my custom color profile.

@Fortidude
Copy link

macOS big sur, MBP 13", 2018

Doesn't matter if external 4k display or the one build-in. Terminal is super slow and freezing so ofter that I started to use Terminal app.

@csakbalint
Copy link

codesign --remove-signature /Applications/Visual\ Studio\ Code.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app

I use vscode-insiders, It doesn't work for me because of "invalid option"

codesign --remove-signature /Applications/Visual\ Studio\ Code -\ Insiders.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app

codesign: invalid option --
Usage: codesign -s identity [-fv*] [-o flags] [-r reqs] [-i ident] path ... # sign
       codesign -v [-v*] [-R=<req string>|-R <req file path>] path|[+]pid ... # verify
       codesign -d [options] path ... # display contents
       codesign -h pid ... # display hosting paths

try to execute the following command then:

codesign --remove-signature /Applications/Visual\ Studio\ Code\ -\ Insiders.app/Contents/Frameworks/Code\ -\ Insiders\ Helper\ \(Renderer\).app

@samalba
Copy link

samalba commented Dec 11, 2020

I have the same issue. Freezes between 1-2 seconds, very often on the whole UI.

Mac OS Big Sur 11.0.1

Version: 1.52.0
Commit: 940b5f4bb5fa47866a54529ed759d95d09ee80be
Date: 2020-12-10T22:46:53.673Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 20.1.0

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.

@guandai
Copy link

guandai commented Dec 14, 2020

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.

codesign --remove-signature /Applications/Visual\ Studio\ Code -\ Insiders.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app

Yes, this one helps to me

on big sur 11.0.1 (20B50), the command is works for me

codesign --remove-signature /Applications/Visual\ Studio\ Code\ -\ Insiders.app/Contents/Frameworks/Code\ -\ Insiders\ Helper\ \(Renderer\).app

Visual Studio Code: Version: 1.52.0
Commit: 940b5f4
Date: 2020-12-10T22:46:53.673Z (3 days ago)
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 20.1.0

@Theoton
Copy link

Theoton commented Dec 15, 2020

Try this, now my terminal works faster:

codesign --remove-signature /Applications/Visual\ Studio\ Code.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app

the command is not works for me.

big sur 11.0.1 (20B29)

Version: 1.52.0
Commit: 940b5f4
Date: 2020-12-10T22:46:53.673Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 20.1.0

@ShayTSC
Copy link

ShayTSC commented Dec 16, 2020

Petition to reopen this issue, thx.

@jon301
Copy link

jon301 commented Dec 16, 2020

Problem is back after upgrading from Big Sur 11.0.1 to 11.1.
Seems like removing the signature again resolves the issue.

@kristianpedersen
Copy link

kristianpedersen commented Dec 19, 2020

When trying to remove the signature now, I get this:

error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate: can't create output file: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer).cstemp (Permission denied)
/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app: the codesign_allocate helper tool cannot be found or used

Version: 1.52.1
Commit: ea3859d
Date: 2020-12-16T16:30:02.420Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 20.2.0

I tried disabling all extensions and commenting out my settings.json file.

The equivalent command does work for the insiders version, but the lagging is still there. cd and ls sometimes take 1-2 seconds.

@love8587
Copy link

Problem is back after upgrading from Big Sur 11.0.1 to 11.1.
Seems like removing the signature again resolves the issue.

This problem is back after upgrading from Big sur 11.0.1 to 11.1 !!!

@raphaaugustosilva
Copy link

Yes, I can confirm that.
Should this issue be reopened?

@love8587
Copy link

Yes, I can confirm that.
Should this issue be reopened?

Yes, it should be opened!!!!

@kueckermann
Copy link

Can confirm that it's also back for me after the latest Big Sur update.

@ChrisRey-C
Copy link

ChrisRey-C commented Dec 23, 2020

Try this, now my terminal works faster:
codesign --remove-signature /Applications/Visual\ Studio\ Code.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app

MAKE SURE TO RESTART VSCODE.

I used this command and it worked great :D I thought I was the only one experiencing the lag, but after someone mentioned it's after you press 'enter,' I noticed it was the same issue as mine. Thank you.

background: macbook 2015, I updated my macos to big sur 11.1 from Catalina

@github-actions github-actions bot locked and limited conversation to collaborators Dec 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests