Skip to content

Way to disable large folders warning #32840

Closed

Description

@kwonoj

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.

Activity

  1. mjbvz commented on Aug 13, 2019

    @mjbvz
    Contributor

    OJ Kwon (@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

  2. AnyhowStep commented on Aug 13, 2019

    @AnyhowStep
    Contributor

    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)
    
  3. kwonoj commented on Aug 13, 2019

    @kwonoj
    Author

    Matt Bierner (@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.

  4. IllusionMH commented on Aug 13, 2019

    @IllusionMH
    Contributor

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

  5. kwonoj commented on Aug 13, 2019

    @kwonoj
    Author

    Andrii Dieiev (@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.

  6. IllusionMH commented on Aug 13, 2019

    @IllusionMH
    Contributor

    Same here: I accidentally found it couple month ago.

    Matt Bierner (@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.

  7. mjbvz commented on Aug 13, 2019

    @mjbvz
    Contributor

    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?

  8. IllusionMH commented on Aug 13, 2019

    @IllusionMH
    Contributor

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

  9. RyanCavanaugh commented on Aug 14, 2019

    @RyanCavanaugh
    Member

    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!

  10. kwonoj commented on Aug 14, 2019

    @kwonoj
    Author

    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.

    Ryan Cavanaugh (@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.

  11. typescript-bot commented on Aug 18, 2019

    @typescript-bot
    Contributor

    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.

  12. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions