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

_GetProjectReferenceTargetFrameworkProperties is extremely slow for F# projects #1510

Closed
saul opened this issue Jan 2, 2017 · 2 comments
Closed
Labels

Comments

@saul
Copy link
Contributor

saul commented Jan 2, 2017

The _GetProjectReferenceTargetFrameworkProperties target appears to take a significant amount of time to complete. This is in relation to F# projects, I can't seem to reproduce the issue with C# projects. I've exacerbated the issue by creating a solution of 100 projects, where by each project has a reference to all of the previous projects (e.g. Project4 references Project1, Project2 and Project3) as a minimal reproduction.

MSBuild: Target Performance Summary:
MSBuild:         0 ms  BeforeCompile                              1 calls
MSBuild:         0 ms  SetWin32ManifestProperties                 1 calls
MSBuild:         0 ms  BeforeResolveReferences                    1 calls
MSBuild:         0 ms  AfterResolveReferences                     1 calls
MSBuild:         0 ms  _AfterCompileWinFXInternal                 1 calls
MSBuild:         0 ms  _ComputeNonExistentFileProperty            1 calls
MSBuild:         0 ms  AfterCompile                               1 calls
MSBuild:         0 ms  PrepareProjectReferences                   1 calls
MSBuild:         0 ms  GetFrameworkPaths                          1 calls
MSBuild:         0 ms  ResolveReferences                          1 calls
MSBuild:         0 ms  AfterCompileWinFX                          1 calls
MSBuild:         1 ms  GetReferenceAssemblyPaths                  1 calls
MSBuild:         1 ms  DesignTimeXamlMarkupCompilation            1 calls
MSBuild:         1 ms  ResolveSDKReferences                       1 calls
MSBuild:         1 ms  _SetEmbeddedWin32ManifestProperties        1 calls
MSBuild:         1 ms  ExpandSDKReferences                        1 calls
MSBuild:         1 ms  Compile                                    1 calls
MSBuild:         2 ms  DesignTimeMarkupCompilation                1 calls
MSBuild:         2 ms  PrepareForBuild                            1 calls
MSBuild:         2 ms  GenerateTargetFrameworkMonikerAttribute    1 calls
MSBuild:         2 ms  ImplicitlyExpandDesignTimeFacades          1 calls
MSBuild:         2 ms  ResolveAssemblyReferences                  1 calls
MSBuild:         2 ms  GetTargetFrameworkProperties              68 calls
MSBuild:         4 ms  _GenerateCompileInputs                     1 calls
MSBuild:         4 ms  GetTargetPath                             68 calls
MSBuild:         4 ms  _SplitProjectReferencesByFileExistence     1 calls
MSBuild:         4 ms  AssignProjectConfiguration                 1 calls
MSBuild:         5 ms  _GenerateCompileDependencyCache            1 calls
MSBuild:         7 ms  CoreCompile                                1 calls
MSBuild:        23 ms  GetInstalledSDKLocations                   1 calls
MSBuild:     49632 ms  ResolveProjectReferences                   1 calls
MSBuild:     107337 ms  _GetProjectReferenceTargetFrameworkProperties  68 calls
MSBuild: 
MSBuild: Task Performance Summary:
MSBuild:         0 ms  GetReferenceAssemblyPaths                  1 calls
MSBuild:         0 ms  Hash                                       1 calls
MSBuild:         0 ms  GetFrameworkPath                           1 calls
MSBuild:         0 ms  MakeDir                                    1 calls
MSBuild:         0 ms  FindAppConfigFile                          1 calls
MSBuild:         0 ms  CallTarget                                 1 calls
MSBuild:         0 ms  ResolveAssemblyReference                   1 calls
MSBuild:         1 ms  Fsc                                        1 calls
MSBuild:         2 ms  WriteLinesToFile                           1 calls
MSBuild:         4 ms  ResolveNonMSBuildProjectOutput             1 calls
MSBuild:         4 ms  AssignProjectConfiguration                 1 calls
MSBuild:     156729 ms  MSBuild                                   69 calls

The fact that this happens with F# and not C# leads me to believe there's something in the C# common targets that is missing from the F# common targets that improves the performance of this target.

It is also worth noting that the _ResolveReferenceDependencies property is set to true, although setting it to false has minimal effect.

See dotnet/fsharp#2107 for more details.

@saul
Copy link
Contributor Author

saul commented Jan 2, 2017

This issue looks like it's in the same area as #1276, cc @rainersigwald

@rainersigwald rainersigwald changed the title _GetProjectReferenceTargetFrameworkProperties is extremely slow _GetProjectReferenceTargetFrameworkProperties is extremely slow for F# projects Apr 26, 2017
@rainersigwald
Copy link
Member

I do suspect this is a duplicate of #1276, but as I mentioned there (#1276 (comment)), I think it's mostly that this target gets blamed for initial blocked-waiting time, rather than is truly slow. If you see evidence to the contrary on F# projects specifically please let us know and we can reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants