Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Way to disable large folders warning #32840

Closed
kwonoj opened this issue Aug 13, 2019 · 11 comments

Comments

@kwonoj
Copy link

commented Aug 13, 2019

This issue is about request to allow a configurable way to disable notification

image

This is reported previously in microsoft/vscode#62871, microsoft/vscode#31188 but locked and cannot continue discussion in original issue.

Clarify, this is not due to misconfiguring excludes:

I'm working on one of repo currently have about 6500 js + jsx + ts + tsx files and it'll likely to grow over. Even exclude unnecessary files as much, vs code keep displaying same notification and would like to disable it, or either way to increase maximum files tsserver can handle to avoid.

@mjbvz mjbvz transferred this issue from microsoft/vscode Aug 13, 2019

@mjbvz

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

@kwonoj Can you please share more information about your general project structure. As a starting point, with your workspace open in VS Code, run code --status from the command line and share the output.

That notification means that intellisense will not work properly, so we'd like to understand why it shows up in the first place instead of just hiding it

@AnyhowStep

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

I wonder what the upper limit for number of files is?

I'm currently at 2492 .ts files in my src directory.

The Workspace Stats,

|    Folder (some-project): 12865 files
|      File types: ts(5060) map(5026) js(2559) json(123) tsbuildinfo(48)
|                  md(30) jpg(3) env(2) sql(2) gitignore(2)
|      Conf files: tsconfig.json(52) package.json(1) tslint.json(1)
|                  launch.json(1) settings.json(1)
|      Launch Configs: node(2)
@kwonoj

This comment has been minimized.

Copy link
Author

commented Aug 13, 2019

@mjbvz

Version:          Code 1.37.0 (036a6b1d3ac84e5ca96a17a44e63a87971f8fcc8, 2019-08-08T01:22:37.660Z)
OS Version:       Darwin x64 18.6.0
CPUs:             Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz (8 x 2500)
Memory (System):  16.00GB (1.87GB free)
Load (avg):       2, 3, 3
VM:               0%
Screen Reader:    no
Process Argv:     .
GPU Status:       2d_canvas:                     enabled
                  flash_3d:                      enabled
                  flash_stage3d:                 enabled
                  flash_stage3d_baseline:        enabled
                  gpu_compositing:               enabled
                  multiple_raster_threads:       enabled_on
                  native_gpu_memory_buffers:     enabled
                  oop_rasterization:             disabled_off
                  protected_video_decode:        unavailable_off
                  rasterization:                 enabled
                  skia_deferred_display_list:    disabled_off
                  skia_renderer:                 disabled_off
                  surface_synchronization:       enabled_on
                  video_decode:                  enabled
                  viz_display_compositor:        disabled_off
                  webgl:                         enabled
                  webgl2:                        enabled

CPU %	Mem MB	   PID	Process
    0	    82	 66730	code main
    0	    66	 66763	   gpu-process
    0	   246	 66764	   window (js/modern/infra/console.js — webapp)
    0	   131	 66770	     extensionHost
    0	    98	 66772	       electron_node tsserver.js 
    0	   229	 66773	       electron_node tsserver.js 
    0	    66	 66783	         electron_node typingsInstaller.js typesMap.js 
    0	    82	 66776	       electron_node eslintServer.js 
    0	    49	 66832	       /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/jsonServerMain --node-ipc --clientProcessId=66770
    0	    66	 66771	     watcherService
    0	    49	 66784	     searchService
    0	   131	 66780	   shared-process
    0	     0	 67048	     /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=

Workspace Stats: 
|  Window (js/modern/infra/console.js — webapp)
|    Folder (webapp): more than 40616 files
|      File types: png(17140) php(11060) json(4695) js(2470) api(1106)
|                  md(1030) hbs(818) less(424) jpg(292) bcmap(168)
|      Conf files: makefile(6) package.json(6) tsconfig.json(4)
|                  webpack.config.js(3) launch.json(1) settings.json(1)
|                  gulp.js(1)
|      Launch Configs: chrome

Open to provide tsserver trace or some more detail, but cannot attach in here as this is private repo.

@IllusionMH

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

Have you tried to set "disableSizeLimit": true inside compilerOptions in tsconfig.json (or in jsconfig.json if you use it)?

@kwonoj

This comment has been minimized.

Copy link
Author

commented Aug 13, 2019

@IllusionMH omg I just learned those option and it seems it makes notification go away, thx for tips.

Should I close issue? I think so as it's controllable at least.

@IllusionMH

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

Same here: I accidentally found it couple month ago.

@mjbvz maybe it make sense to update https://code.visualstudio.com/Docs/languages/javascript "Common questions" section to describe steps how to deal with this error?
How to exclude large folders and then disableSizeLimit after common large folders are excluded.

I will create suggestions and PR in vscode-docs if needed.

@mjbvz

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

That sounds like a good idea. Here's the relevant repo: https://github.com/microsoft/vscode-docs/blob/master/docs/typescript/typescript-compiling.md

Would you like to submit a docs PR that adds that section?

@IllusionMH

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

Yes, will do if no one will do it before me.

@RyanCavanaugh

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

Glad you found the setting!

I will issue my standard warning that that message is in place because generally TS Server will crash due to running out of memory when analyzing that much code at once, so simply turning off the warning and proceeding will likely result in a loop of TS Server trying to analyze everything, crashing, and restarting. But if it works for you anyway - carry on!

@kwonoj

This comment has been minimized.

Copy link
Author

commented Aug 14, 2019

I will issue my standard warning that that message is in place because generally TS Server will crash due to running out of memory when analyzing that much code at once, so simply turning off the warning and proceeding will likely result in a loop of TS Server trying to analyze everything, crashing, and restarting.

@RyanCavanaugh

Thanks for heads up - this is actually living concern for us. But also working on large-scale codebase we don't have lot of options as well. What'd be recommended way to scale up tsserver to deal with those large amount of files (without warning)? in a long run we'd like to split project into project references, but that won't going to happen soon.

@typescript-bot

This comment has been minimized.

Copy link
Collaborator

commented Aug 18, 2019

This issue has been marked as 'Question' and has seen no recent activity. It has been automatically closed for house-keeping purposes. If you're still waiting on a response, questions are usually better suited to stackoverflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.