-
Notifications
You must be signed in to change notification settings - Fork 689
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
Omnisharp freezes during extension initialization with excessive CPU usage #3627
Comments
NOTEReverting to 1.21.12 fixes this issue. |
Found the following in the event viewer logs, which may or may not have something to do with the issue? (Frankly the 1.21.13 version makes VS Code so unstable that I cannot really judge anymore.) Regardless of whether this ties into the freezing problem or not, there also appears to be a compatibility problem with the Razor language service now.
|
@rjgotten that looks like a result of failed extension initialization but not a cause. If you:
Doing these steps will force O# to re-fetch the Razor language server which should then have the appropriate bits included. |
@NTaylorMullen I've reverted back to 1.21.12 in the meantime via VSIX install so it also has the old publisher ID, avoiding the issues related to the publisher ID switch as well. Taken as a whole 1.21.13 is just broken. Imho it should be pulled and maybe 1.21.12 should just be republished under the new publisher ID with no further changes. |
Please try the v1.21.15 prerelease and let us know if it resolves your performance issue. |
It does not - I have had to revert to .12 as well - this should be a high priority fix, makes using vscode with C# almost impossible for an extended period of time at the moment! |
@kieranbenton Can you give us more details about you project? Others have reported this same issue with asp.net projects containing large 'node_modules' folder or Unity projects with a large 'PackageCache' folder. What type of project are you building and do you have any folders with many nested subfolders in your project? |
Sure (sadly not OSS so can't just dump you some stats directly) - I'd classify it as a relatively complex solution folder with a handful of top level folders (k8s, src, tests). Src is the biggy - 14 csharp projects in folders in there. 5 are applications. Rest are libraries. Apps range from a 'mostly react/nextjs SPA with lightweight ASP MVC backend' app, to a heavy ASP.NET Core MVC app, to command line apps. So yes, node_modules is present - I wouldn't say its unusual usage though?
gives... (I can give you without the excludes if you like but this is usually what I use to give me an idea of size)...
Happy to provide more info if you can let me know what you want to know - or try builds out for you if you like. Cheers! |
@kieranbenton Is '/node_modules' in either your |
Yup.
|
@kieranbenton If what you are experiencing is the same as other users, the problematic code is searching for files under the 14 C# project folders. It takes advantage of the @NTaylorMullen I know you were thinking about limiting the search to |
Is there anything I can do to confirm that we are experiencing the same issue? Any logs to look for? |
@kieranbenton Has VS Code popped up to recommend that you log an issue and provided you a .cpuprofile to share? See https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load |
I aborted that conversation to figure out. I can re-ignite it to find out if it's valid. |
@JoeRobich nope - not had any of that, it just hangs |
Seems to have done the trick for me. |
@kieranbenton Before publishing 1.21.15 we made a final change to remove any file searching at all. Can you please try the public release and let me know how it performs? |
@rjgotten Thanks for the report. Closing this now that 1.21.15 has been published. |
@JoeRobich just upgraded again to .15 and it does indeed look as if this has been resolved. Cheers! |
Environment data
VS Code version: 1.42.1
C# Extension version: 1.21.13
Steps to reproduce
Look at the extension host log, which will list a sequence of:
Expected behavior
For the extension to be well behaved.
Actual behavior
The extension is broken and doesn't initialize correctly.
Occasionally VSCode will complain about excessive CPU usage.
Once frozen have to close VS Code down (as the command pallete to restart Omnisharp doesn't work) and start it back up, then let Omnisharp sit there spinning rims for ~5m before whatever is blocking it gives up and the extension hopefully initializes without hanging indefinitely again.
The text was updated successfully, but these errors were encountered: