Open jasonwilliams opened 1 month ago
You can also add the out
folder to the watcher exclude list using the files.watcherExclude
setting.
You can also add the
out
folder to the watcher exclude list using thefiles.watcherExclude
setting.
Thanks @lszomoru
Do you know why VSCode still watches gitignored folders? Is this intentional? Or the logic wasn't added to ignore them. Even if the watching is required, having git fire "git status" on ignored folders is certainly a bug (due to there being no change).
It seems like this should be off by default, rather than developers needing to explicitly set this. It is also unnecessarily using a lot of resource when builds happen. This took me a while to figure out, so I'm sure other developers have fallen into this issue without knowing why it's happening.
Does this issue occur when all extensions are disabled?: N/A
I noticed Git goes crazy whenever I build Chromium. It shouldn't be because I'm not running any Git-related tasks while this is happening, it takes up a lot of CPU. I noticed this older issue: https://github.com/microsoft/vscode/issues/177773
I follow the same steps mentioned here and looked at the trace output. It looks like every time the build generates a new file in the
out
directory it triggers the git extension to rungit status
again. I think I've managed to calm it down a bit by setting"git.autorefresh": false,
, you can see the output below.Output:
Despite it skipping this still looks like a bug, the
out
directory is in my gitignore so it shouldn't be doing anything on changes within this directory at all anyway. Should there be logic added to here to not trigger git commands if the file changes are in an ignored repository?Using
autorefresh false
is a workaround to the problem but not a proper solution as I do want git to update when genuine files have changed. Maybe either the git extension should be fixed, or the built-in workspace watcher has a config to not watch ignored folders.Steps to Reproduce: