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

Severe performance degradation opening large folders in latest release #79336

Closed
starkat99 opened this issue Aug 16, 2019 · 14 comments
Closed

Severe performance degradation opening large folders in latest release #79336

starkat99 opened this issue Aug 16, 2019 · 14 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues terminal Integrated terminal issues
Milestone

Comments

@starkat99
Copy link

  • VSCode Version: 1.37.1
  • OS Version: Windows 7

I regularly have Code open to a workspace with a large number of files in a single folder ( >20k files). I've never really had a problem with that until the latest release of 1.37.1, where I experience severe lagginess in every element of Code UI, especially text response in editor windows and terminal. This occurs even when Explorer sidebar is not visible. CPU usage shows Code using a large percentage of CPU. Previous version 1.37 seemed ok (but not great) for the day or two I had it, and I definitely know 1.36 builds worked just fine for this case. This issue occurs with extensions disabled (it's pretty much impossible to run with extensions at all in this state).

Steps to Reproduce:

  1. Open a folder workspace with a large amount of files. Explorer sidebar does not need to be open.
  2. Observe laggy UI performance, laggy typing in text windows, especially a terminal window. The performance will sometimes improve briefly, before degrading again after performing any action.

Does this issue occur when all extensions are disabled?: Yes

@gjsjohnmurray
Copy link
Contributor

/needsMoreInfo - please review https://github.com/Microsoft/vscode/wiki/Performance-Issues and post the additional info it suggests gathering.

@vscodebot vscodebot bot added the info-needed Issue requires more information from poster label Aug 17, 2019
@vscodebot
Copy link

vscodebot bot commented Aug 17, 2019

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

@isidorn isidorn self-assigned this Aug 19, 2019
@vscodebot vscodebot bot removed the new release label Aug 20, 2019
@starkat99
Copy link
Author

Here's the performance issue reporter data, and attaching the both the Javscript profiler data and Performance profiler data of me typing into a terminal while a folder with 20k files is open (where it has >2s typing lag)
CPU-20190820T142627.cpuprofile.txt
Profile-20190820T143149.json.txt

CPUs | Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz (12 x 3491)
-- | --
GPU Status | 2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwareoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_deferred_display_list: disabled_offskia_renderer: disabled_offsurface_synchronization: enabled_onvideo_decode: enabledviz_display_compositor: disabled_offwebgl: enabledwebgl2: enabled
Load (avg) | undefined
Memory (System) | 63.91GB (55.26GB free)
Process Argv | --disable-extensions --verbose
Screen Reader | no
VM | 0%
CPU %	Mem MB	   PID	Process
    0	    95	  6416	code main
    0	    64	  3792	   window (Issue Reporter)
    0	    19	  3816	   utility
   23	    69	  5188	   shared-process
    0	   107	  7392	   gpu-process
    0	    11	  9876	   electron-crash-reporter
    0	   421	 10792	   window (Welcome - _materials - Visual Studio Code [Administrator])
    0	     5	 11020	     winpty-process
    0	     4	 11048	       C:\WINDOWS\system32\cmd.exe
    0	    13	 11056	     watcherService 
    0	    68	 11196	     extensionHost
|  Window (Welcome - _materials - Visual Studio Code [Administrator])
|    Folder (_materials): more than 21242 files
|      File types: xml(21242)
|      Conf files:

Extensions are disabled

@isidorn isidorn assigned bpasero and unassigned isidorn Aug 21, 2019
@isidorn isidorn removed the info-needed Issue requires more information from poster label Aug 21, 2019
@bpasero
Copy link
Member

bpasero commented Aug 21, 2019

Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: https://code.visualstudio.com/insiders/

@bpasero bpasero added the info-needed Issue requires more information from poster label Aug 21, 2019
@starkat99
Copy link
Author

Same thing on Insider's build, here's a new set of performance captures using insiders

Profile-20190821T132035.json.txt
status.txt
CPU-20190821T132143.cpuprofile.txt

@bpasero
Copy link
Member

bpasero commented Aug 22, 2019

@RMacfarlane moving to you as this looks like shared process is spiking, probably the workspace statting? Is there a way to turn that off?

@bpasero bpasero assigned RMacfarlane and unassigned bpasero Aug 22, 2019
@bpasero bpasero added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label Aug 22, 2019
@RMacfarlane
Copy link
Contributor

RMacfarlane commented Aug 22, 2019

Yes, this is likely due to the workspace stats call. I made a change yesterday that should improve perf somewhat, @starkat99 can you let me know if you see any difference with today's insiders?

On tomorrow's insiders, changing the telemetry.enableTelemetry setting to false should avoid the workspace stat computation being made at all

@gjsjohnmurray
Copy link
Contributor

For another tip to reduce stat load see #78710. I submitted a PR for that issue but it hasn't yet been accepted.

@starkat99
Copy link
Author

Sorry for the delay. I tried the latest insiders again, nothing's changed. Still getting severe performance issues. Attaching new profiling results
Profile-20190826T134134.json.txt
CPU-20190826T134253.cpuprofile.txt

@RMacfarlane
Copy link
Contributor

@starkat99 Thanks for testing it. Did changing the telemetry.enableTelemetry setting in that version have any impact?

@vscodebot vscodebot bot closed this as completed Sep 2, 2019
@vscodebot
Copy link

vscodebot bot commented Sep 2, 2019

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@RMacfarlane RMacfarlane reopened this Sep 4, 2019
@RMacfarlane RMacfarlane removed the info-needed Issue requires more information from poster label Sep 4, 2019
@starkat99
Copy link
Author

I tried this again in today's Insiders build. The issue has mostly gone away, just not completely. Most of the UI seems to be functioning normally now (with or without telemetry enabled, it makes no difference) with the exception of the terminal. As soon as a terminal receives focus (or a new terminal is opened, unhidden, etc.) the severe UI lagginess returns to the entire UI. But once I change focus away from terminal or close it and give it a couple seconds for the lag to resolve, the rest of the UI returns to regular performance. So, as long as I avoid using a terminal everything is usable again with a large workspace folder.

@RMacfarlane
Copy link
Contributor

Thanks @starkat99!

I'm able to reproduce this issue, I created a folder with 30k text files in it at the top level. This doesn't seem to be related to the workspace stats call, since it also happens when telemetry is off. When the terminal has focus, there are repeated calls to fs.readdir that are taking more than a second to return

@RMacfarlane RMacfarlane assigned Tyriar and unassigned RMacfarlane Sep 9, 2019
@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues labels Sep 13, 2019
@Tyriar Tyriar added this to the Backlog milestone Sep 13, 2019
@Tyriar
Copy link
Member

Tyriar commented Oct 9, 2019

This this new setting in insiders:

"terminal.integrated.enableFileLinks": false

@Tyriar Tyriar closed this as completed Oct 9, 2019
@Tyriar Tyriar added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 9, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

6 participants