Git extension is super slow since version 1.56.0
Describe the bug
Since VSCodium updated to 1.56.0, I am suffering important slowdown of the editor. The SCM is particularly slow in all its features (especially showing diffs and refreshing changes, but also committing). It also causes slowdown for the GitLens extension but the slowdown remain even when disabling the extension. I have run an extension audit and it has shown that Git extension was some time not responsive. It causes slowdown in the whole application, with a kind of side effect on other extensions such as ESLint or Prettier.
I have downgraded VSCodium to the version 1.55.2 and everything is running smoothly then. Upgrading back to 1.56 show the slowdown again?
Please confirm that this problem is VSCodium-specific
- [X] This bug doesn't happen if I use Microsoft's Visual Studio Code. It only happens in VSCodium. I have tried it on the same project with Visual Studio Code 1.56.
Please confirm that the issue/resolution isn't already documented
- [X] I checked the Docs page and my issue is not mentioned there.
To Reproduce Steps to reproduce the behavior:
- Open a project with a remote
- Write down some edits.
- Open the SCM tab. It should be loading for while
- Click a changed file, the diff should takes a while to show up.
Expected behavior A SCM as fas as it as in the version 1.55.2.
Screenshots
Desktop (please complete the following information):
- OS: Mac OS
- Architecture x64
- Version 1.56.0
Can't reproduce it on Linux.
Same problem on my MacBook Pro 2019, there are errors in the console when i try to add a file to my index :
mainThreadExtensionService.ts:62 TypeError: Cannot read property 'document' of undefined
at /Users/owen/.vscode-oss/extensions/arjun.swagger-viewer-3.0.1/out/preview/client.js:167
at fire (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:57)
at i.$acceptModelChanged (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:87)
at l._doInvokeHandler (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:91)
at l._invokeHandler (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:91)
at l._receiveRequest (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:91)
at l._receiveOneMessage (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:91)
at /Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:91
at fire (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:57)
at S.fire (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65)
at /Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:106
at fire (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:57)
at S.fire (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65)
at t._receiveMessage (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65)
at /Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65
at fire (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:57)
at acceptChunk (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65)
at /Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65
at Socket.v (/Applications/VSCodium.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:106)
at Socket.emit (events.js:315)
at addChunk (internal/streams/readable.js:309)
at readableAddChunk (internal/streams/readable.js:284)
at Socket.Readable.push (internal/streams/readable.js:223)
at Pipe.onStreamRead (internal/stream_base_commons.js:188)
$onExtensionRuntimeError @ mainThreadExtensionService.ts:62
_doInvokeHandler @ rpcProtocol.ts:417
_invokeHandler @ rpcProtocol.ts:402
_receiveRequest @ rpcProtocol.ts:318
_receiveOneMessage @ rpcProtocol.ts:245
(anonymous) @ rpcProtocol.ts:110
fire @ event.ts:622
fire @ ipc.net.ts:468
_receiveMessage @ ipc.net.ts:821
(anonymous) @ ipc.net.ts:660
fire @ event.ts:622
acceptChunk @ ipc.net.ts:241
(anonymous) @ ipc.net.ts:202
_ @ ipc.net.ts:50
emit @ events.js:315
addChunk @ internal/streams/readable.js:309
readableAddChunk @ internal/streams/readable.js:284
Readable.push @ internal/streams/readable.js:223
onStreamRead @ internal/stream_base_commons.js:188
and
[[object Object]]Cannot read property 'document' of undefined
$onExtensionRuntimeError @ mainThreadExtensionService.ts:61
_doInvokeHandler @ rpcProtocol.ts:417
_invokeHandler @ rpcProtocol.ts:402
_receiveRequest @ rpcProtocol.ts:318
_receiveOneMessage @ rpcProtocol.ts:245
(anonymous) @ rpcProtocol.ts:110
fire @ event.ts:622
fire @ ipc.net.ts:468
_receiveMessage @ ipc.net.ts:821
(anonymous) @ ipc.net.ts:660
fire @ event.ts:622
acceptChunk @ ipc.net.ts:241
(anonymous) @ ipc.net.ts:202
_ @ ipc.net.ts:50
emit @ events.js:315
addChunk @ internal/streams/readable.js:309
readableAddChunk @ internal/streams/readable.js:284
Readable.push @ internal/streams/readable.js:223
onStreamRead @ internal/stream_base_commons.js:188
I've done a quick check of the source code of the extension. It might be an issue with the extension. At line 146-147, there is a check if there is an active editor. Then at line 194, there is no checks. This might not be the issue but the error log seems to match.
@daiyam If it is the extension that does this problem do we have the same problem on Visual Studio Code and not only Vscodium ?
@Nopraz Good question. Can you check if you are getting the errors on VSCode even if it's not slow?
Just checked, no errors on visual studio code
I have also checked on VSCode the other day and have not seen any slowdown.
I can't reproduce the error with VSCodium v1.56.1 and the examples from the OpenAPI Specification. Can you give me example of the files on which you are getting the errors? Or try those examples?
It's slowed down everywhere—even when just opening up a tiny project I'll see "Initializing JS/TS language features..." and "Activating language features..." spinning in my status bar for what feels like 5 seconds each. It's gotten significantly better for me with v1.56.2, but it's still not where v1.55.2 was. I notice it most when Git pulling (via the UI) and when the autofix feature enabled via editor.codeActionsOnSave.source.fixAll is working.
I have the same issue: MacBook Pro MacOs Big Sur, 11.3
$ uname -a
Darwin (HOSTNAME) 20.4.0 Darwin Kernel Version 20.4.0: Fri Mar 5 01:14:14 PST 2021; root:xnu-7195.101.1~3/RELEASE_X86_64 x86_64
Not sure if it's related but here is also my git version:
$ git --version
git version 2.29.0
I just downloaded and installed 1.55.2 and the issue is gone
I faced the same issue:
Mb Pro 2018, Big Sur 11.3.1
$ uname -a Darwin (HOSTNAME) 20.4.0 Darwin Kernel Version 20.4.0: Thu Apr 22 21:46:47 PDT 2021; root:xnu-7195.101.2~1/RELEASE_X86_64 x86_64
Git:
$ git --version
git version 2.31.1
@mlbiche @MrOggy85 @sagolubev Can you troubleshoot your setup? I'm on macOS and I can't reproduce the issue. I've opened the vscode project with gitlens activated and I don't have any slow down. Can you try a blank VSCodium with just gitlens activated?
Does the solution of @robinloeffel is working?
{
"editor.codeActionsOnSave": {
"source.fixAll": true
}
}
@daiyam I tried it, but no difference.
I have Gitlens extension installed but I also tried to disabled it but no difference.
I also disabled all extensions, but no difference.
I also removed all my settings, but no difference.
It happens for any type of files. I have tried with .ts, .json, .md
It happens both if I open a folder and if I use workspace (which is even slower).
Can you edit /Applications/VSCodium.app/Contents/Resources/app/product.json and replace "extensionAllowedProposedApi": [...], with the following code?
"extensionAllowedProposedApi": ["GitHub.codespaces", "GitHub.vscode-pull-request-github-insiders", "GitHub.vscode-pull-request-github", "Microsoft.vscode-nmake-tools", "ms-ai-tools.notebook-renderers", "ms-dotnettools.dotnet-interactive-vscode", "ms-python.gather", "ms-python.python", "ms-toolsai.jupyter", "ms-toolsai.vscode-ai", "ms-toolsai.vscode-ai-remote", "ms-vscode-remote.remote-containers-nightly", "ms-vscode-remote.remote-containers", "ms-vscode-remote.remote-ssh-edit-nightly", "ms-vscode-remote.remote-ssh-edit", "ms-vscode-remote.remote-ssh-nightly", "ms-vscode-remote.remote-ssh", "ms-vscode-remote.remote-wsl-nightly", "ms-vscode-remote.remote-wsl", "ms-vscode-remote.remote-wsl-recommender", "ms-vscode-remote.vscode-remote-extensionpack-nightly", "ms-vscode-remote.vscode-remote-extensionpack", "ms-vscode.azure-account", "ms-vscode.azure-sphere-tools-ui", "ms-vscode.azure-sphere-tools", "ms-vscode.github-browser", "ms-vscode.github-richnav", "ms-vscode.remotehub", "ms-vscode.remotehub-insiders", "ms-vscode.js-debug-nightly", "ms-vscode.js-debug", "ms-vscode.lsif-browser", "ms-vscode.vscode-js-profile-flame", "ms-vscode.vscode-js-profile-table", "ms-vscode.vscode-selfhost-test-provider", "ms-vscode.test-adapter-converter", "ms-vsliveshare.cloudenv-explorer", "ms-vsliveshare.cloudenv", "ms-vsliveshare.vsliveshare", "ms-vsonline.vsonline", "dbaeumer.vscode-eslint"],
I tried it, but still no difference
I also tried removing the app and install the latest version from the .dmg file from "Releases" page here on Github. But, still same issue.
Originally I installed vscodium from brew, if that helps at all.
I've looked at the git extension and I've seen that vscode's team have added virtual workspaces. So the change of extensionAllowedProposedApi was related to that. Maybe it's another property of product.json that needs to be updated, but I don't know...
This still occurs on latest. Also tried disabling all extensions, but no luck
- OS: macOS 11.2.3
- Architecture x64
- Version 1.57.1
I was able to confirm that downgrading to 1.55.2 fixed my issue with laggy editor behavior when switching tabs or opening files.
Was it from local files or remote files?
I was also able to reproduce this issue on my mac with versions >1.55.2. The whole editor became noticibly sluggish. I'll keep poking at it to see if I can figure out what changed.
While playing with remote ssh, I found that I can't connect to my VM with VSCodium where I can with VSCode...
For me, local files.
On Thu, Jul 1, 2021 at 15:15 Baptiste Augrain @.***> wrote:
Was it from local files or remote files?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/VSCodium/vscodium/issues/718#issuecomment-872583212, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADRE3IM56EOKYIWZVWUOCDTVTSIZANCNFSM44REVNNQ .
Same here in Manjaro, I tried to install python extension on Vscodium, but it keeps "installing" and nothing happens
Hi, I have the same problem with 1.57.1 version and macos 11.4 on a macbook pro 16". I add that the extension doesn't work (it doesn't recognize the git repository) until I disable and enable it again.
@atapfedora @enx1998 If you are talking about the python extension, please open another issue. This issue is about slow git...
For the git issue, I can't reproduce it on my macOS or my arch linux... VSCode is having the same issue (for example: https://github.com/microsoft/vscode/issues/120883)
Can you share your git --version and the Git log in View/Output?
git --version returns git version 2.32.0.
I reverted to 1.55.x so I can't get the output log right now.
On Fri, Jul 9, 2021 at 2:40 AM Baptiste Augrain @.***> wrote:
For the git issue, I can't reproduce it on my macOS or my arch linux... VSCode is having the same issue (for example: microsoft/vscode#120883 https://github.com/microsoft/vscode/issues/120883)
Can you share your git --version and the Git log in View/Output?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/VSCodium/vscodium/issues/718#issuecomment-877057109, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADRE3LN54ZBYPIVF6EECHDTW27YVANCNFSM44REVNNQ .
@daiyam git --version return git version 2.30.1 (Apple Git-130).
In Git log I can't see anything strange, only these messages repeating for each change (I think) I made to project files:
> git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname)
> git remote --verbose
> git config --get commit.template
> git show --textconv :resources/assets/js/main/login.js
> git ls-files --stage -- resources/assets/js/main/login.js
> git check-ignore -v -z --stdin
> git cat-file -s 341e36b9b819ada3dcf91969960bd2fc34f2f665
> git status -z -u
> git symbolic-ref --short HEAD
> git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/feature/newsletter_registration_flag refs/remotes/feature/
For the extension that doesn't work, I mean the native Git extension.
@daiyam I can add that with version 1.57.1 a project take 23 seconds to load with all extensions, instead with 1.55.2 the same project loads in 4 seconds. In 1.57.1 I can see these messages on output window log:
[2021-07-11 00:33:14.049] [renderer1] [warning] [File Watcher (chokidar)] Watcher is not using native fsevents library and is falling back to unefficient polling.
[2021-07-11 00:33:14.244] [renderer1] [error] Cannot delete property '0' of [object String]: TypeError: Cannot delete property '0' of [object String]
at s (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1809:15207)
at o (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1809:14258)
at n._handler (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1809:14837)
at n._handle (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1809:5401)
at n.acceptUsers (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1809:5305)
at Function._handleExtensionPoint (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2938:121627)
at Va._doHandleExtensionPoints (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2938:120746)
at Va._startLocalExtensionHost (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2944:9392)
at async Va._scanAndHandleExtensions (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2944:8354)
at async Va._initialize (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2938:115281)
[2021-07-11 00:33:14.266] [renderer1] [error] Cannot read property 'length' of undefined: TypeError: Cannot read property 'length' of undefined
at Object.D [as equalsIgnoreCase] (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:60:62319)
at file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1811:43224
at Array.find (<anonymous>)
at d.getDebugger (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1811:43214)
at file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1811:39968
at Array.forEach (<anonymous>)
at file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1811:39852
at Array.forEach (<anonymous>)
at n._handler (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1811:39832)
at n._handle (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1809:5401)
at n.acceptUsers (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1809:5305)
at Function._handleExtensionPoint (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2938:121627)
at Va._doHandleExtensionPoints (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2938:120746)
at Va._startLocalExtensionHost (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2944:9392)
at async Va._scanAndHandleExtensions (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2944:8354)
at async Va._initialize (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2938:115281)
[2021-07-11 00:33:26.443] [renderer1] [warning] UNRESPONSIVE extension host, 'amiralizadeh9480.laravel-extra-intellisense' took 99% of 1846.49ms, saved PROFILE here: 'file:///var/folders/wp/fjgmfqm9615b4x4m8106m9sc0000gn/T/exthost-ceeb95.cpuprofile' [{"id":"amiralizadeh9480.laravel-extra-intellisense","total":1830609,"percentage":99},{"id":"bmewburn.vscode-intelephense-client","total":2571,"percentage":0},{"id":"codingyu.laravel-goto-view","total":115,"percentage":0},{"id":"ms-vscode.vscode-typescript-tslint-plugin","total":1186,"percentage":0},{"id":"neilbrayfield.php-docblocker","total":257,"percentage":0},{"id":"redhat.vscode-yaml","total":3480,"percentage":0},{"id":"self","total":6398,"percentage":0},{"id":"vscode.git","total":947,"percentage":0},{"id":"vscode.typescript-language-features","total":546,"percentage":0}]
[2021-07-11 00:33:44.755] [renderer1] [warning] UNRESPONSIVE extension host, 'redhat.vscode-yaml' took 84% of 15165.477ms, saved PROFILE here: 'file:///var/folders/wp/fjgmfqm9615b4x4m8106m9sc0000gn/T/exthost-a58d85.cpuprofile' [{"id":"bmewburn.vscode-intelephense-client","total":1095300,"percentage":7},{"id":"gc","total":11412,"percentage":0},{"id":"program","total":1156,"percentage":0},{"id":"redhat.vscode-yaml","total":12773258,"percentage":84},{"id":"self","total":2813,"percentage":0},{"id":"TabNine.tabnine-vscode","total":773579,"percentage":5},{"id":"vscode.json-language-features","total":506585,"percentage":3},{"id":"vscode.npm","total":888,"percentage":0},{"id":"vscode.php-language-features","total":133,"percentage":0}]
[2021-07-11 00:33:48.395] [renderer1] [error] Unable to write to User Settings because tabnine.experimentalAutoImports is not a registered configuration.: Error: Unable to write to User Settings because tabnine.experimentalAutoImports is not a registered configuration.
at S.reject (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2409:15315)
at S.resolveAndValidate (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2409:18300)
at S.doWriteConfiguration (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2409:12505)
at Object.factory (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2409:12281)
at E.consume (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:68:16017)
at file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:68:15832
at new Promise (<anonymous>)
at E.queue (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:68:15756)
at S.writeConfiguration (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2409:12266)
at E.writeConfigurationValue (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2409:41473)
at file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2409:27566
at Array.map (<anonymous>)
at E.updateValue (file:///Applications/Developer/VSCodium.new.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2409:27554)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
[2021-07-11 00:33:49.010] [renderer1] [error] Cannot read property 'length' of undefined: TypeError: Cannot read property 'length' of undefined
at Object.GetDefaultLevel (/Users/enx/.vscode-oss/extensions/bobmagicii.autofoldyeah-1.0.6/extension.js:287:37)
at Object.GetLevel (/Users/enx/.vscode-oss/extensions/bobmagicii.autofoldyeah-1.0.6/extension.js:262:27)
at Object.Fold (/Users/enx/.vscode-oss/extensions/bobmagicii.autofoldyeah-1.0.6/extension.js:96:31)
at Timeout._onTimeout (/Users/enx/.vscode-oss/extensions/bobmagicii.autofoldyeah-1.0.6/extension.js:187:20)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
```
that don't appear in 1.55.2 version and Git native extension work as expected.