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

Find in files operation extremely slow after upgrade to 1.33.0 #71819

Closed
doberkofler opened this issue Apr 5, 2019 · 12 comments
Closed

Find in files operation extremely slow after upgrade to 1.33.0 #71819

doberkofler opened this issue Apr 5, 2019 · 12 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@doberkofler
Copy link

doberkofler commented Apr 5, 2019

Issue Type: Performance Issue

It seems that the upgrade to 1.33.0 might have introduced some performance problems when searching for something in multiple files. Searching in a repository of about 600 files typically took 10-15 seconds and now takes up to 5 minutes. Unfortunetely the problem does not seem to be consistent but it happens in 50-75% of find operations. While running the build in "Process explorer shows "30 559 14508 window (module.ts - periscope - Visual Studio Code [Administrator]) and the cpu utilization in the task manager of Windows stays on 100%.

VS Code version: Code 1.33.0 (0dd516d, 2019-04-04T15:14:28.026Z)
OS version: Windows_NT x64 6.1.7601

System Info
Item Value
CPUs Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz (4 x 2691)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: unavailable_off
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 7.89GB (1.18GB free)
Process Argv
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
    0	    68	 10820	code main
    1	    71	 11068	   gpu-process
    0	    44	 13104	   shared-process
    8	   557	 14508	   window (index.ts - periscope - Visual Studio Code [Administrator])
    0	     1	  8168	     electron-crash-reporter
    0	    33	  8996	     searchService
    2	     8	 17060	       "c:\Users\doberkofler.LBITS\AppData\Local\Programs\Microsoft VS Code\resources\app\node_modules.asar.unpacked\vscode-ripgrep\bin\rg.exe" --hidden --ignore-case -g **/src/modules/** -g **/src/modules -g !**/configs/** -g !**/configs -g !**/scripts/** -g !**/scripts --max-filesize 17179869184 --no-ignore --follow --pcre2 --regexp buttonEmailForward --no-config --no-ignore-global --json -- .
    0	     7	 12588	     watcherService 
    0	    90	 16372	     extensionHost
    0	    71	  5740	       "C:\Users\doberkofler.LBITS\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\doberkofler.LBITS\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\html-language-features\server\dist\htmlServerMain" --node-ipc --clientProcessId=16372
    0	    10	  9596	       "C:\Users\doberkofler.LBITS\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\doberkofler.LBITS\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain" --node-ipc --clientProcessId=16372
    0	   451	 16484	       electron_node tsserver.js 
    0	     4	 16964	         electron_node typingsInstaller.js typesMap.js 
    0	    37	 16676	       electron_node server.js 
    0	   391	 16876	       electron_node eslintServer.js 
    0	    59	 16980	   window (Issue Reporter)
Workspace Info
|  Window (index.ts - periscope - Visual Studio Code [Administrator])
|    Folder (periscope): 1746 files
|      File types: ts(597) gif(357) png(232) html(202) css(91) styl(81)
|                  psd(47) js(39) tsx(23) less(13)
|      Conf files: package.json(2) tsconfig.json(1) webpack.config.js(1)
|                  settings.json(1);
Extensions (11)
Extension Author (truncated) Version
vscode-eslint dba 1.8.2
svn-scm joh 1.47.12
python ms- 2019.3.6352
printcode nob 3.0.0
vscode-docker Pet 0.6.1
code-settings-sync Sha 3.2.8
stylelint shi 0.48.0
language-stylus sys 1.11.0
vscode-icons vsc 8.4.0
stylint vtf 0.0.2
plsql-language xyz 1.8.0
@roblourens
Copy link
Member

roblourens commented Apr 5, 2019

Nothing changed on our end. Does the process MsMpEng.exe show up in task manager? If not what is using high CPU?

What do you mean by

While running the build in "Process explorer shows "30 559 14508 window (module.ts - periscope - Visual Studio Code [Administrator])

@roblourens roblourens added the info-needed Issue requires more information from poster label Apr 5, 2019
@doberkofler
Copy link
Author

doberkofler commented Apr 5, 2019

Does the process MsMpEng.exe show up in task manager?

Yes!
image

What do you mean by...

forget it. i just copied one line from the vscode process explorer

@roblourens
Copy link
Member

Ok. That's windows defender scanning all the files being searched. Unfortunately there's nothing we can do about that. This sometimes happens after new releases. I'm guessing that the new code gets whitelisted by Defender after it has been out for a bit.

@doberkofler
Copy link
Author

What files would I need to exclude in vscode files? Thank you!

@MrAcalf
Copy link

MrAcalf commented Apr 6, 2019

Same problem here, mine is on infinite load loop and the intellisense is stuck forever.

@roblourens
Copy link
Member

What files would I need to exclude in vscode files? Thank you!

Not sure what you mean, if you have a large folder like node_modules that isn't already excluded from search, you can add that to search.exclude.

@doberkofler
Copy link
Author

I wanted to understand what files might be responsible for the dramatic slowdown. The node_modules folder, all temp folders a d distribution directories are always excluded from searching.

@roblourens
Copy link
Member

Unfortunately Windows Defender thinks that it needs to scan all files as they are searched, and apps don't have any control over that.

@doberkofler
Copy link
Author

... even if I exclude them from the search?

@roblourens
Copy link
Member

It's scanning the files that are searched

@doberkofler
Copy link
Author

... then I really don’t understand why it slowed down so much after the update. Maybe something else changed and I will have to dig deeper.

@hd4ng
Copy link

hd4ng commented Apr 11, 2019

@doberkofler I think #71751 will solve your problem. There is a workaround in the comment.

@vscodebot vscodebot bot locked and limited conversation to collaborators May 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants