-
Notifications
You must be signed in to change notification settings - Fork 419
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
Perf: OmniSharp takes several minutes to load projects #926
Comments
I'm hitting this too. Larger solutions need more time to load. Can VS code load projects in parallel? |
Is there anything that can be done to speed this up locally? It's taking around 2.5 minutes on my project. |
This is going to get faster soon. We've just taken newer MSBuild bits, which have some performance enhancements. In addition, you can install the latest Mono MDK and load OmniSharp via that Mono rather than the stripped-down Mono that OmniSharp includes to get a speed boost. If you run OmniSharp on an official Mono install, it will run on native AOT-compiled images rather than JIT. |
OK, using official Mono shaves off ~10 seconds for me, I am looking forward to the MSBuild enhancements! |
Wow! That's pretty significant! I don't know if there's any way to disable it. @mholo65: Do you have any ideas? |
you can always disable any project system (msbuild, dotnet, script, cake) using the following syntax in the omnisharp.json file.
So in this case it would be:
Then to project system wouldn't even get initialized. |
@DustinCampbell @Figbash yeah problem is that both csx project system and cake project system searches all files in all directories for ping @filipw |
@filipw Thanks, that helped shave off 35 seconds. |
@Figbash: You only need the DotNetProejctSystem if you are using legacy project.json projects. If you're doing Unity work, you can safely disable this one too. |
I tried to write prototype that loads projects concurrently. Expensive/slow part is project instance build step that takes majority of time during load. However it seems that build cannot be executed concurrently Is there way to build concurrently in msbuild workspace at all? Steps like updating projects takes only few percent of total time during startup, so this build is the part of optimize if any 🤔 |
We have about 260 projects, and omnisharp is completely unusable, because of slow loading of projects. |
Is there an update on this? It takes quite a while for our projects to load with Omnisharp |
Unity Development |
Just checking in to see if there are any updates on this issue. It is definitely something our team struggles with still. |
Yep - Even just opening a file can take several minutes for omnisharp to load, if it loads at all |
And before this is written off as a hardware issue on the user's end, here are my hardware specs: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz And OS is Ubuntu 20.04 So my hardware should be able to load up my projects faster than it does. Other IDEs that I use for the same project load up much faster. |
Waiting like 30secs for 30k lines |
#1074 was marked as a duplicate of this, but in fact they are different. This is talking about large files taking a long time and timing out. 1074 is talking about multi-project solutions. If you've got a large number of projects in your solution, vscode loads the one by one in a single thread, which takes ages. To solve that issue will be a different change than to solve slow loading of large projects. |
I tried to load this solution from AWS SDK in OmniSharp v1.37.16: https://github.com/aws/aws-sdk-net/blob/master/sdk/AWSSDK.NetStandard.sln It took 3min37 to load on my box (using the embedded mono). Loading most projects is "quick", but loading 3 test projects takes most of the time (1min47):
Then the I'm not sure how I can help, but I would be very interested by a speed boost when loading this kind of solution. |
Is there any update on this? |
please 🙏 its so annoying - everything is working but its just so slowwwww this is my config for unity projects:
|
OmniSharp is timing out on loading solutions with large files within the default timeout in VS code (60 seconds). The timeout can be increased, but the solution still takes several minutes to load. On some solutions, it takes 3-4 minutes to load the project system.
Repro:
git clone https://github.com/aspnet/Blazor-Hackathon
dotnet restore Blazor.Core.sln
Open VS Code and try to load Blazor.Core.sln
Canonical link: https://github.com/aspnet/Blazor-Hackathon/tree/a8c341fcb5a519fb7c931eaa9ba23bde560433ef
Result
The output log shows OmniSharp trying to load the project correctly, but it times out after 60 seconds with an error printed to the Output > Omnisharp Log window in in VS Code.
Workaround
Increase project load timeout to 4 minutes
Details
VS Code: 1.14.2
C# Extension: 1.12.0-beta3
Mono: 5.2.0.196
OS: macOS 10.12.5
dotnet: 2.0.0-preview2-06497
The text was updated successfully, but these errors were encountered: