Code saving becomes super slow when "GitLens Status Bar" is enabled.
Description
When I try to save my code and I have GitLens Status Bar enabled, the saving takes a few seconds. CPU Fans start spinning etc. However, the moment I disable GitLens Status Bar the problem goes away.
This also happens on the "Release" version as well.
GitLens Version
v2024.8.905 (pre-release)
VS Code Version
Version: 1.92.0 Commit: b1c0a14de1414fcdaa400695b4db1c0799bc3124 Date: 2024-07-31T23:26:45.634Z Electron: 30.1.2 ElectronBuildId: 9870757 Chromium: 124.0.6367.243 Node.js: 20.14.0 V8: 12.4.254.20-electron.0 OS: Linux x64 6.10.3-arch1-2
Git Version
git version 2.46.0
Logs, Screenshots, Screen Captures, etc
CPU Profile Logs with GitLens and GitLens Statusbar Enabled: CPU-20240809T134013.860Z-3.cpuprofile
CPU Profile Logs without GitLens: CPU-20240809T134013.860Z-2.cpuprofile
CPU Profile with GitLens enabled but Status Bar disabled:
Hi @ATheCoder Thank you for contacting us.
We are trying to reproduce the problem. Could you tell us a little bit more about your environment:
- do you see it on a specific repository or on any repository? specific file or any file?
- how big is the repository where you see the problem, how many files?
- is it an open source repo?
- does it depend on how big the file is, on size of file's history or variety of its blame?
@sergeibbb No problem at all :)
Unfortunately it is not an open source repository. So replication might be a bit complicated. However, it doesn't matter whether the file is big or small. In my repository I have ignored all the folders that either include lots of files or include files that have a huge size. They are ignored based on exclude watch as well as exclude search.
This issue does not happen on every repo that I develop on. I also do believe this might have something to do with git. Maybe too many refs etc. But I wasn't able to pinpoint the issue. We did used to have lots of branches (upwards of 500) but I have removed them (now 20) just to fix this issue. I have re-cloned the repository after the removal of the branches, However, the problem still persists.
If you provide me with steps, I am wiling to provide any logs/more info for you.
@ATheCoder
When you say you "disable" the GitLens status bar how are you doing that? Via GitLens settings? Also do you still have inline blame enabled?
Can you also please enable debug logging by running the GitLens: Enable Debug Logging command from the Command Palette (F1 or ctrl/cmd+shift+p). This will enable logging to the GitLens & GitLens (Git) channels in the Output pane.
Once enabled, please reproduce the issue, and attach the logs from the GitLens and GitLens (Git) channels.
Thank you!
@eamodio @sergeibbb
I found a very interesting piece of new information! The repository includes both TypeScript, React and Python files. Opening a TS file by itself doesn't cause the issue. The issue happens once you have a TypeScript file open and then you also go and open a python file. Once you do that, the TS file is now slow during save. Still, disabling "GitLens Status Bar" fixes the issue and the issue doesn't happen when two TS files or TSX files are open. Irrespective of whether Status Bar is enabled or not.
Also, note that the python code is just a single file without any dependencies to other files. The whole repository includes a single Python file.
To answer your question, yes, I disable it via the VSCode settings, specifically, it is the below setting:
The logs your requested: GitLens-With-Status-Bar.log
Sorry for the late reply, it has been a very hectic week.
@ATheCoder we've looked at the logs, and we are really unsure how GitLens can be affecting saving. Do you also have inline blame enabled in GitLens? I'm assuming you have other extensions installed -- can you disable all of them (and enable only GitLens) to see if they have any effect? As it could be an interaction between GL and another extension.
Do you get a notification when the save takes a long time?
@eamodio
I'm not 100% sure but I think this has something to do with the recent Intel 13/14th generation CPU stability issues.
I have applied the recent BIOS fix and the issue seems to not happen anymore or not happen as often as it used to.
I will monitor this closely and report any new information. In the meantime, I'd suggest keeping this issue open for at least another week until I gather more information.
Thank you again for your time and assistance.
@eamodio This was indeed an issue with CPU stability. Applying the latest BIOS has completely fixed the issue.
Thank you for the help and sorry to take up your time. (Intel's fault really)
For future reference, You'll need to apply the latest BIOS and also revert to factory settings.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.