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

Huge performance drop in opening projects using MSBuildWorkspace #76679

Open
jzielnik opened this issue Jan 8, 2025 · 0 comments
Open

Huge performance drop in opening projects using MSBuildWorkspace #76679

jzielnik opened this issue Jan 8, 2025 · 0 comments
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@jzielnik
Copy link

jzielnik commented Jan 8, 2025

Version Used: 4.12.0 (versus 4.8.0)

Steps to Reproduce:

  1. Open project using MSBuildWorkspace (we use loop to iterate over all projects in solution)
var workspace = MSBuildWorkspace.Create(additionalProperties);
Project project = workspace.OpenProjectAsync(projectPath).Result;
  1. Measure performance of opening projects in both versions of Microsoft.CodeAnalysis nugets.
  2. We have used following open-sourced projects:

Expected Behavior: Time of opening projects between versions should not be that different.

Actual Behavior: Performance of the opening projects has decreased significantly. I suspect this could be related to moving Roslyn engine to separate exe which is BuildHost.

This performance issue could be introduced with 4.9.0 when BuildHost was introduced, but we have updated directly from 4.8.0 to 4.12.0 so we didn't observe performance between these versions.

version 4.8.0

Solution      | Number of projects | Total time [s] | MAX [s] | AVG [s]
SharpDevelop  |         44         |      14.40     |  5.80   | 0.33
SimplCommerce |         34         |      13.97     |  6.34   | 0.41
CAP           |         31         |      11.66     |  5.35   | 0.38

version 4.12.0 (in brackets there is percentage increase)

Solution      | Number of projects | Total time [s] | MAX [s] | AVG [s]
SharpDevelop  |         44         |  119.24 (828%) |  10.24  | 2.71
SimplCommerce |         34         |   80.36 (575%) |   8.22  | 2.36
CAP           |         31         |   48.85 (419%) |   9.18  | 1.58
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

1 participant