Steps to Reproduce:
{
"compilerOptions": {
"target": "ES6",
"module": "es6"
},
"exclude": [
"bower_components",
"node_modules"
]
}

@elsigh just checking: Your file is jsconfig.json, correct?
Indeed, jsconfig.json
When I click the bug it opens my jsoncfig.json file even.
But it is true that I have a lot of files in subdirectories there.
I'll see if it continues to happen as I'm pretty excited about using vscode going forward!
@elsigh Can you hover over the message and let me know what the full reading is? There should be more folders

But that's my primary project working directory ;) I don't want to exculde it.
😄 that makes sense. The logic to compute the exclude suggestions isn't very smart and doesn't go _deep_. Meaning that when there is a large folder inside the ConsumerWeb folder we point to the parent only.
My question is if your project is actually that large or if this is caused by some dependencies or temp files (like ember serve easily creates 20mb of JS files)
That folder is 10MB of actual code and some images but there are no temp things / build artifacts. Is there a way to exclude particular directories within a folder (e.g. **/img/)?
I do also have a number of things excluded in files.exclude and search.exclude (the exact same things fwiw, which seems redundant) and Quick Open is reasonable at least.
Yeah, in jsconfig you cannot use glob patterns but you can spell out the full relative path to exclude things. Tho, by default the language brain only loads js and d.ts files. If with that you hit a limit there is only the option of multiple jsonfig files in subdirectories left...
Ok, then it sounds like I don't need to exclude image directories anyway (but that accounts for some of the 10MB I mentioned earlier). It does seem that once I dismiss this warning it shouldn't continue to come back to bother me.
Well, the problem is that language service is really struggling with large amount of files. Can you run wc -l 'find . -iname "*.js"' (' is actually a back tick) in a terminal to see with how many lines of JS code we are dealing? Or, iff possible, can you share the project with me?
I can't share the code with you, but here's the result for that directory:
29264 total
That should be OK. Today the warning is generated when there are more then 500 files. Once we adopt a newer version of TypeScript the language service will tell us more precisely when it has to much to chew on
Sorry, but as a user, that doesn't make sense to me. =)
The editor works fine enough for me.
I dismissed a prompt that is inactionable for me.
It comes back.
That just seems like an interaction bug.
I fully understand that this is a bad solution and I am sorry that you are hit by this.
Technical details are always bad for explaining bad user behaviour but let me try: Under the hood VS Code forks a separate process (tssserver.js) that handles all JavaScript (and TypeScript) requests like validation, completions etc. We talk to that 'server' via stdio using a defined protocol.
When the server is under heavy load caused by a large project (one monster file, 1000s tiny files) it just stops responding/starts crawling. There is no signal from the server that it encountered overload so we are forced to use what we got so far - the number of files... Our guesstimate is 500 files times 200loc in average resulting in 100000loc. We know that heuristic doesn't work when there are many tiny files or when there is a single giant file. We the very soon coming next version of tsserver it will do the counting (in bytes) and report overload when a certain threshold is reached (I believe 20MB of sources).
Sorry to pile on here, but I keep getting For better performance exclude folders with many files, like: '/client/' messages, but I'm already excluding client/node_modules and
$ find . | grep -v node_modules | wc -l
44
I have
"exclude": [
"node_modules",
"bower_components",
"jspm_packages",
"tmp",
"temp"
]
in my jsconfig.json settings. Why does this message keep popping up, and what can I do to stop it?
Have same issue: offers me to Configure Excludes, notice says "/node_modules/", but I have excluded them and everything don't need, like dist dir etc.
Tried both with slashes and without, same result.
FWIW if you also have a .vscode/settings.json it still complains...
// Place your settings in this file to overwrite default and user settings.
{
// Configure glob patterns for excluding files and folders in searches. Inherits all glob patterns from the files.exclude setting.
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/.typings": true,
"tags": true,
"**/www": true,
"**/sessions": true,
"**/.meteor/**": true
},
// setup tabs / spaces
"editor.tabSize": 2,
// use spaces instead of tabs
"editor.insertSpaces": true,
"editor.detectIndentation": false
}
I'm also having this issue:
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"allowSyntheticDefaultImports": true
},
"compileOnSave": false,
"exclude": [
"node_modules",
"__clientTemp"
]
}
And it still says "Configure Excludes" on my .js files; despite having set it!
Version 1.7.1 (1.7.1)
02611b40b24c9df2726ad8b33f5ef5f67ac30b44
2016-11-03T13:44:00.572Z
With #16355, the TypeScript server will now tell us when a project includes too many files. Before, we used our own logic on the VSCode to determine this.
The next insiders build should include this change. Please try it out and let us know if you notice any problems or have any suggestions on how things could be improved.
Thanks.
I keep getting the message To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on. even though my jsconfig.json file is already configured.

// jsconfig.json
{
"compilerOptions": {
"experimentalDecorators": true
},
"exclude": [
"build",
"node_modules"
]
}
Any idea?
Same issue here:
To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on.
And my jsconfig.json is defined:
{
"exclude": [
"node_modules",
"components/bower",
"components/ie",
"components/other",
"dist",
".temp",
".vscode",
"localization",
"typings"
]
}
This problem has gotten much worse with the latest update. I'm seeing this warning appear repeatedly sometimes within a matter of seconds of each other. It seems to increase with navigator usage (though not directly, perhaps because the reaction is delayed).
For anyone experiencing this with a tsconfig.json, this was being caused by the allowJs property in the config. Set allowJs to false.
{
"compilerOptions": {
"baseUrl": ".",
"target": "es5",
"module": "commonjs",
"allowJs": false
}
}
To track down which files are being included in your ts/js project:
"typescript.tsserver.log": "verbose"Open TS Server log commandtsserver.log file in the opened folder. There should be lists of files printed as part of the logs. Look for files that are unexpectedly being included
Ubuntu 17.04 & VSCode Version 1.14.2
With this simple jsconfig.json file I get To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on. on every launch:
{
"exclude": [
"node_modules"
]
}
Moreover I noticed that my Jasmine test files don't have IntelliSense if I delete this config file.
Also variable renaming with F2 stops working with this file present:
No result.
ErrorSorry, rename failed to execute.
Hi,
I'm facing the same issue on the latter 1.14 versions which makes mono repo development particularly painful.
As an example I've cloned Jest. Without any code change, I've followed @mjbvz recommendations and with 1.14.2 I got the warning shortly after starting vscode. 1.13.1 on the other hand works just fine.
Diffing the logs between the two versions didn't output many changes and indeed in my case there seemed to be no difference on the files being included.
I've included both log files.
Thanks
tsserver.log.zip
I am also facing the same issue, I have the following jsConfig.json
{
"compilerOptions": {
"target": "es6",
"experimentalDecorators": true
},
"exclude": [
"node_modules",
"bower_components",
"tmp",
"vendor",
".git",
".vscode",
"dist",
"addons",
"scripts",
"coverage"
]
}
Why does the allowjs property show up as invalid
I had this issue but I gave my jsconfig.json another look and realised I was not excluding bower_components which took my number of files down to ~250ish from ~550ish. I believe this has stopped the warning, but I think there is a small change that vscode could introduce to make this less intrusive. For example, you could expose the file limit via a setting (letting users get themselves into trouble if they so wish) or perhaps add a setting to your workspace to disable the warning. My project has been functioning perfectly despite this warning so probably one of two things should happen:
As it stands, showing an unavoidable warning with such a large margin of error is probably not ideal.
@peabnuts123 we already do this on modern versions of TypeScript. The 500 file limit only applies if you are using TS < 2.1.3. Otherwise, the TypeScript server tells us when it cannot handle any more files.
I may not be fully grasping how this works but I am not using TypeScript at all, I have a purely JavaScript project, and am using jsconfig.json. Running latest editor and stuff so I can't see why I'd be using any old runtimes
The typescript server powers our JavaScript language features as well. If you are only working in JS and have not configured "typescript.tsdk", you are already on the latest TS release so there should be nothing to worry about
All of the above is true but I still get:
To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on.
if I remove bower_components from my excludes (raising the .js file count to ~550, from ~300).
As far as I can tell, projectStatus.ts is still checking against a limit of 500. I cannot accurately determine what it actually does when this limit is hit, though.
I am getting this when using "extends" in my tsconfig.json,
tsconfig.base.json:
{
...
"include": [
"src/client/**/*"
]
}
src/tsconfig.json:
{
"extends": "../tsconfig.base"
}
If I remove the src/tsconfig.json, VSCode will pick up tsconfig.base.json and stop producing the message. This has made VSCode unusable and should be a feature that we can disable.
For me, the problem was my build folder, contained a source-map file which was 16MB, By adding the build folder to excludes list vscode stopped nagging.
I fixed the problem by excluding the dist folder or whatever folder generated by webpack e.g.
"exclude": [
"node_modules",
"dist"
]
I've excluded build folder and it still pops up.
@the-spyke yeah mine starting nagging again too :/
I feel like this should be reopened.
I have an ember-cli project that uses Typescript and am running into this error, sometimes several times a minute :/ . I've tried all relevant suggestions in this thread, to no avail. Which has made VS Code pretty unusable...
I think this should be re-opened. I am working on a project that has >1000 js files in it, so vscode has started giving me this warning every time I open the project which is very disruptive. I have no way of disabling it, but my use-case is perfectly legitimate. That seems like a defect to me
If you are seeing this, please open a new issue. It's much easier to track instances of these sort of problems in separate issues since the root causes are often different
For the new issue, please describe your basic project layout and also try checking the TS Server log to see if any odd files are being included:
"typescript.tsserver.log": "verbose"Open TS Server log in vscodetsserver.log file, there should be lists of all the files that are in your project. These are printed in blocks that look like:Info 3182 [14:47:23.682] Project '/Users/matb/projects/TypeScript-TmLanguage/build/tsconfig.json' (Configured) 0
Info 3182 [14:47:23.682] /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/lib.d.ts
/Users/matb/projects/TypeScript-TmLanguage/build/node_modules/@types/js-yaml/index.d.ts
/Users/matb/projects/TypeScript-TmLanguage/build/build.ts
/Users/matb/projects/TypeScript-TmLanguage/build/index.d.ts
/Users/matb/projects/TypeScript-TmLanguage/build/node_modules/@types/node/index.d.ts
Info 3182 [14:47:23.682] -----------------------------------------------
Info 3182 [14:47:23.682] Project '/dev/null/inferredProject2*' (Inferred) 1
Info 3182 [14:47:23.682] /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/lib.es6.d.ts
/Users/matb/projects/TypeScript-TmLanguage/node_modules/xcson/lib/xcson.js
/Users/matb/projects/TypeScript-TmLanguage/node_modules/typeof/index.js
/Users/matb/projects/TypeScript-TmLanguage/node_modules/cson2yaml/lib/cson2yaml.js
/Users/matb/projects/TypeScript-TmLanguage/index.js
/Users/matb/Library/Caches/typescript/2.5/node_modules/@types/node/index.d.ts
Scan through these project lists to see if anything stands out
I can open a new issue if necessary for visibility but it is _exactly_ as described in this one, I am unsure if that's the right thing to do.
tsserver.log has the Project … (Configured) line that you have shown followed by about ~7 random files (I can't see how these 7 files are related). Further down, there is a section titled Sending request and then some JSON representing a large number of files, all the JS files in my project (>1000). From my understanding, this large number of files is triggering this warning, as described in the original issue.
Yes please open a new issue. This makes it easier to track the characteristics of just your project. 1000 files should not crash typescript unless the files are very large, so I suspect there is something else at play here
Did anyone create a new issue yet? I see this in 1.17 (insiders). For getting any work done I'm still on 1.13.1 since that was the last build where this wasn't a problem.
No, sorry, I have not yet created a new issue. I think it is kind of generally related to my vscode chugging in general (due to a couple of related factors) which is triggering the TSServer to say that it is lagging.
@senocular In my case the issue got resolved after 1.16.1 Not sure about 1.17 (insiders) but VSCode stopped nagging ever since 1.16.1.
@human-a I still see it with 1.16.1 too.
How to disable this really annoying stupid warning?
Improvements to 1.17 + resetting my PRAM seems to have entirely removed this issue for me. I think I've been facing a general swathe of performance issues that resetting my PRAM may have mitigated, and this was related to all of that.
I'm also still getting this in 1.16.1. Been putting up with this longer than I can remember. My excludes are configured. We need a setting to make this message go away or set the heuristic file limit higher or... something.
Actually in my case it's this very similar message:

Same issue here. MacOS, VSCode 1.17.1
I fixed this by just explicitly including what I needed rather than excluding hundreds of other folders:
"include": [
"userapp/static/js/"
]
Most helpful comment
I feel like this should be reopened.