diff --git a/src/vs/sessions/contrib/configuration/browser/configuration.contribution.ts b/src/vs/sessions/contrib/configuration/browser/configuration.contribution.ts index ab58adf1c9b..9852a3a9b3f 100644 --- a/src/vs/sessions/contrib/configuration/browser/configuration.contribution.ts +++ b/src/vs/sessions/contrib/configuration/browser/configuration.contribution.ts @@ -29,12 +29,6 @@ Registry.as(Extensions.Configuration).registerDefaultCon 'extensions.ignoreRecommendations': true, 'files.autoSave': 'afterDelay', - 'files.watcherExclude': { - '**/.git/objects/**': true, - '**/.git/subtree-cache/**': true, - '**/node_modules/*/**': true, - '**/.hg/store/**': true - }, 'git.autofetch': true, 'git.branchRandomName.enable': true, diff --git a/src/vs/workbench/contrib/files/browser/files.contribution.ts b/src/vs/workbench/contrib/files/browser/files.contribution.ts index 8f36c834a3a..c0b8db32da0 100644 --- a/src/vs/workbench/contrib/files/browser/files.contribution.ts +++ b/src/vs/workbench/contrib/files/browser/files.contribution.ts @@ -295,7 +295,16 @@ configurationRegistry.registerConfiguration({ 'patternProperties': { '.*': { 'type': 'boolean' } }, - 'default': { '**/.git/objects/**': true, '**/.git/subtree-cache/**': true, '**/.hg/store/**': true }, + 'default': { + // Avoiding a '**' pattern here which results in a very complex + // RegExp that can slow things down significantly in large workspaces + '.git/objects/**': true, + '.git/subtree-cache/**': true, + '.hg/store/**': true, + '*/.git/objects/**': true, + '*/.git/subtree-cache/**': true, + '*/.hg/store/**': true + }, 'markdownDescription': nls.localize('watcherExclude', "Configure paths or [glob patterns](https://aka.ms/vscode-glob-patterns) to exclude from file watching. Paths can either be relative to the watched folder or absolute. Glob patterns are matched relative from the watched folder. When you experience the file watcher process consuming a lot of CPU, make sure to exclude large folders that are of less interest (such as build output folders)."), 'scope': ConfigurationScope.RESOURCE },