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

[windows] Slow opening (vscode, file, folder...) #56644

Closed
cboillat opened this issue Aug 17, 2018 · 100 comments
Closed

[windows] Slow opening (vscode, file, folder...) #56644

cboillat opened this issue Aug 17, 2018 · 100 comments
Assignees
Labels
electron Issues and items related to Electron perf perf-startup upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues
Milestone

Comments

@cboillat
Copy link

Issue Type: Performance Issue

Hi,

Since the last july update and the switch to the user version (vs. all users version) of vscode, everything is slow. Vscode takes like 20 seconds to open and then when I click on a file it takes another 10 seconds to open it.

I tried to disable all extensions, nothing changed.

The problem came right after I downloaded the "user version" of vscode. Before that, I had the "all users version" installed and everything was ok. Maybe it's because I'm on an entreprise computer linked to a windows domain and our user PATH is special and located on a network drive.

Thanks in advance for your help !

Regards
Clément

VS Code version: Code 1.26.0 (4e93618, 2018-08-13T16:29:31.933Z)
OS version: Windows_NT x64 10.0.16299

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz (8 x 2694)
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_software
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: unavailable_off
Memory (System) 7.91GB (0.76GB free)
Process Argv C:\Users\clement.boillat\AppData\Local\Programs\Microsoft VS Code\Code.exe --prof-startup
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
    0	   119	 15100	code main
    1	    64	  1360	   window (Issue Reporter)
    0	   134	  5676	   shared-process
    0	   157	 13184	   window (Untitled-1)
    0	   152	 13748	     extensionHost
    0	    38	 16416	     searchService
    0	    16	 18372	     electron-crash-reporter
    0	   145	 13336	   gpu-process
    0	    25	 14028	   utility
Workspace Info
;
Extensions (21)
Extension Author (truncated) Version
vscode-color ans 0.4.5
path-intellisense chr 1.4.2
open-html-in-browser cod 0.1.21
bracket-pair-colorizer Coe 1.0.59
vscode-eslint dba 1.4.12
vscode-html-css ecm 0.2.0
vsc-material-theme Equ 2.3.0
prettier-vscode esb 1.6.1
beautify Hoo 1.3.2
smarty imp 0.3.0
sftp lix 1.3.9
prettify-json moh 0.0.3
vscode-apache mrm 1.1.1
sublime-keybindings ms- 4.0.0
color-highlight nau 2.3.0
vetur oct 0.12.6
code-settings-sync Sha 3.0.0
trailing-spaces sha 0.2.11
stylelint shi 0.39.0
quokka-vscode Wal 1.0.137
html-css-class-completion Zig 1.17.1
@sandy081
Copy link
Member

Please follow this guide to track down what's slow https://github.com/Microsoft/vscode/wiki/Performance-Issues

@sandy081 sandy081 added the info-needed Issue requires more information from poster label Aug 17, 2018
@cboillat

This comment has been minimized.

@AndySteel-kcom
Copy link

I've experienced the same issue. Upgraded on two machines - 1) Windows 10 Enterprise 64-bit, 2) Windows 2008 R2 64-bit. Problem appeared when upgrading to 1.26.1 (July?). I've uninstalled and gone back to an earlier version as it's taking about 19 seconds before the main window appears then about another 10-15 seconds before the application loads the files/folders.

I tried both User and "All" versions and it appears in both, since I first noticed when upgrading to the User version.

@cboillat
Copy link
Author

@AndySteel-kcom thank you for your feedback !

Same here, I tried to switch back to "All" version but it does not change. Both versions are slow. But I also first noticed after upgrading to the User version.

@AndySteel-kcom

This comment has been minimized.

@AndySteel-kcom

This comment has been minimized.

@AndySteel-kcom
Copy link

On the Win 2008 R2 machine I just clicked on the Terminal window and it took almost a minute to activate itself with the command line prompt.

It then popped up with a warning - "The standard renderer for integrated terminal appears to be slow on your computer. Would you like to switch to the alternate DOM-based renderer which may improve performance."

I chose to revert to DOM-based and it improved the terminal rendering but the remainder of the app very very slow. For example just selected File...Open Folder and chose a folder. It then took 18 seconds of doing nothing before starting to load the folder. It let me continue editing files in the meantime.

@jrieken
Copy link
Member

jrieken commented Aug 17, 2018

Please follow this guide (https://github.com/Microsoft/vscode/wiki/Performance-Issues#visual-studio-code-starts-up-slowly) and attach the CPU profiles you get when starting with --prof-startup

@AndySteel-kcom
Copy link

What guide sorry ? I thought I had provided the output of the --prof-startup above?

@jrieken
Copy link
Member

jrieken commented Aug 17, 2018

Ops, forget to paste the link... The --prof-startup generates three files, those are needed to understand what's slow

@cboillat

This comment has been minimized.

@jrieken
Copy link
Member

jrieken commented Aug 20, 2018

It's that it cannot find a free port... Can you retry after restarting your computer?

@cboillat
Copy link
Author

@jrieken nothing changed after the reboot, still the same error.

@jrieken
Copy link
Member

jrieken commented Aug 20, 2018

Anything on your system that would prevent us from connecting to port 9222? Firewall? Another service etc?

@cboillat
Copy link
Author

@jrieken ok, I managed to launch vscode with code -prof--startup but no sign of profile files. Where should they be located ?

@cboillat
Copy link
Author

You can find attached a video showing how slow the startup is and that I do not have any files generated after a --prof-startup launch.

FYI, before the last update I never had any problem with vscode.

Video:
vscode-sloooowwwww.zip

@jrieken
Copy link
Member

jrieken commented Aug 21, 2018

Where should they be located ?

In your home directory. The --prof-startup command doesn't seem to work you, you should get into a different flow, being prompted from the editor... Let's take that to another issue.

Wrt the perf problem. Have you tried insiders vs stable? Can you start, do F1 > Startup Performance and copy the output here (enclosed in triple backticks, please)

@vscodebot vscodebot bot removed the new release label Aug 21, 2018
@cboillat

This comment has been minimized.

@jrieken
Copy link
Member

jrieken commented Aug 22, 2018

What? There should be a table like this. Please open dev tools first, wait a little, leave dev tools open and run 'Startup Performance' again

screen shot 2018-08-22 at 15 29 45

@cboillat
Copy link
Author

Here it is :

image

@jrieken
Copy link
Member

jrieken commented Aug 22, 2018

Thanks - great. It takes shockingly ~20seconds to create the renderer process. Thats often caused by über-eager anti virus software or other OS specific things

@jrieken jrieken added electron Issues and items related to Electron and removed info-needed Issue requires more information from poster labels Aug 22, 2018
@bpasero bpasero added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Aug 23, 2018
@z4cH3r
Copy link

z4cH3r commented Apr 6, 2020

@Ma15fo43 how did you know what program caused it?
also i don't have any av, but it's so slowwwwww

@fowled
Copy link

fowled commented Apr 6, 2020

@Ma15fo43 how did you know what program caused it?
also i don't have any av, but it's so slowwwwww

@z4cH4r I figured it out by uninstalling a lot of my programs 😅
Quite annoying because it takes a lot of time but when you get your 2 sec startup back you're happy :)

@falfiya
Copy link

falfiya commented Apr 6, 2020

Malwarebytes (AV) was the issue for me. Once I disabled that, things were fine.

@tomocrafter
Copy link

@coalpha I tried safe mode of windows so any av and other software never affect vscode.

@falfiya
Copy link

falfiya commented Apr 7, 2020

I'd imagine that the extensions marketplace is largely dependent on your network connection.
As for file editing, it's possible that you have some vscode extensions that have save participants that take a long time to run.

@dukio
Copy link

dukio commented Apr 14, 2020

Also got the same bug in 1.42.0. Fixed by uninstalling a program (in that case, Badlion Client) that was completely slowing down VSCode.
Startup time with bug: ~20 secs to load everything
Without it: at least 5 seconds to load huge projects

THANK YOU! Badlion Client was the issue for me too...

I was having this issue since months (~40s startup) with no idea what was causing it.... uninstalled badlion client, restarted, and now code is super fast to open!

@tomocrafter
Copy link

tomocrafter commented Apr 14, 2020

@Ma15fo43 @dukio THANK YOU!!!!!!!
OMFG, It actually worked for me. All I did thing is just uninstall badlion client and then restart the pc.
now code is extremely fast...
EDIT: I tried other electron apps like discord, postman. and It was also taking like 1 min to launch but now launches within 1 sec.

@fowled
Copy link

fowled commented Apr 15, 2020

No problem! We're now sure that the Badlion Client is slowing down all the Electron apps installed on the PC. Maybe talking with the Badlion Staff Team will help resolving this issue?

Edit: I found a similar issue on the Badlion forums: https://www.badlion.net/forum/thread/240288

@mastergberry
Copy link

Hi. We will investigate why the Badlion Client could be causing a slowdown like this. Didn't know it was on such a mass scale as is being shown here in this thread. Had one isolated report a while back (not the one linked), but I see there are more reports coming in with time.

@jrieken jrieken mentioned this issue Apr 20, 2020
@Lach993
Copy link

Lach993 commented Apr 26, 2020

im having the same problem,
i only have windows native AV and i deleted badlion (and 20 other apps). it takes around ~50 seconds to startup

vscode info

Version: 1.44.2 (user setup)
Commit: ff91584
Date: 2020-04-16T16:36:23.138Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363

i mainly program in python and i do alot of small projects, often wanting to have 3 instances open but it just takes too long to open to be worth it.
it has been a probelm for about a month and its just getting annoying now.
i have re-isntalled vscode multiple times, restarted my computer etcetera
i have 1 extension (python 2020.4.74986) and it is disabled

things like:
opening vscode
opening workspaces
deleting shells

if anyone can help let me know

@mastergberry
Copy link

Hi. Just wanted to drop an update that the issue related to Badlion Client should now be resolved with VSCode.

Anything else that is happening is 100% out of our scope. Good luck on any other problems :)

@tomocrafter
Copy link

@mastergberry what was the causing this problem?

@jrieken
Copy link
Member

jrieken commented Apr 27, 2020

@mastergberry Thanks for the update and the fast turn-around

Now, let's find out what other applications/settings/etc exist that can slow things down.

@alialtun14
Copy link

After the Windows 10 update process, VS Code and other programs I used had slowed down. I noticed that the Cortana service was open after the update. I turned off this service and restarted Windows. It's now back to normal.

@jrieken
Copy link
Member

jrieken commented Aug 19, 2020

After the Windows 10 update process

Do you know the fully detailed version of windows that you have updated to?

@alialtun14
Copy link

August 11, 2020—KB4566782 (OS Build 19041.450)
August 11, 2020-KB4569745 Cumulative Update for .NET Framework 3.5 and 4.8 for Windows 10 Version 2004

@pyce-lb
Copy link

pyce-lb commented Dec 4, 2020

I have similar issues when opening files with VS Code. Any updates on this?

@fowled
Copy link

fowled commented Dec 5, 2020

There are some workarounds. First, you can try to uninstall the Badlion Client if you have it on your computer. Some people still have problems with it. Then you can disable the Cortana service if you are on Windows. We are always looking for applications or settings that can slow down VsCode but this should help! You can also create a new issue if none of the above solutions work for you, by following the procedure for performance issues (see here)

@mastergberry
Copy link

There are some workarounds. First, you can try to uninstall the Badlion Client if you have it on your computer. Some people still have problems with it. Then you can disable the Cortana service if you are on Windows. We are always looking for applications or settings that can slow down VsCode but this should help! You can also create a new issue if none of the above solutions work for you, by following the procedure for performance issues (see here)

As I mentioned above already, all of the Badlion Client issues were resolved a long time ago. Anything else is not from us.

@corylulu
Copy link

Looks like a user identified it as being a problem with "Nahimic service" / Nahimic audio drivers. Stopping the Nahimic service for me immediately resolved the issue.
#22087 (comment)

@deepak1556
Copy link
Collaborator

I am closing this as there are multiple issues consolidated here. The issue due to Badlion client is considered to be fixed and the issue due to Nahimic audio drivers is tracked here #113360

And if you still see a slowdown with latest insiders https://code.visualstudio.com/insiders that is not due to above two softwares, please open a new issue. Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
electron Issues and items related to Electron perf perf-startup upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests