Skip to content

Unacceptably slow solution load times #2107

@saul

Description

@saul

F# solutions that contain a relatively large number of projects (e.g. 100) that have a relatively large number of project references (approx 50 on average) take an age to load, even with Lightweight Solution Load enabled.

On my machine, "Preparing solution" takes over 6 minutes (I killed VS after this so I don't know how long it takes in full). Furthermore each project load takes several seconds. This is in stark contrast to C# solutions of the same size and with the same number of project references, which takes under a minute to load completely.

This issue is not specific to VS 2017, as the same issue occurs in VS 2015 (and most likely 2013 too). I tried to use dotTrace to analyse where all the time is being spent, but 96% of it is in "Stack traces without user methods". I'm not sure whether this means I don't have symbols for some modules, or whether the majority of the time is spent in native code.

Repro steps

I have attached a script to reproduce this issue.

  1. Download and extract the attached ZIP (see end of issue)
  2. Run gen.fsx
  3. Open dense/Dense.sln in Visual Studio. This will load a large F# solution.
  4. Compare the load times to denseCSharp/Dense.sln.

Expected behavior

Similar performance to C#, as the projects contain no code or public interface to be analysed/type inferred.

Actual behavior

Painfully slow performance :(

Known workarounds

Use VS Code.

Related information

Provide any related information

  • Operating system: Windows 10
  • Branch: 2017 RC2
  • Editing Tools (e.g. Visual Studio Version): 2017 RC2
  • Links to performance testing scripts: Perf.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.Regression

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions