roslyn: Visual Studio should use the concurrent GC to minimize UI thread freezes

I encounter huge UI freezes while triggering autocomplete in F# code. It turns out they were caused by blocking GC:

image

Here we see a 28 seconds (!) freeze, i.e. autocompele appeared after 28 seconds delay, all this time entire Visual Studio is unresponsive.

Turning on the concurrent GC like this:

...<runtime><gcConcurrent enabled="true" />...</runtime>

in C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe.config

makes things a lot better:

image

Here we have ~2 seconds freeze as a maximum.

I understand it’s a VS configuration issue, not Roslyn, but VS is not open sourced and I don’t know where I should create this issue.

/cc @forki @dsyme

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 9
  • Comments: 23 (10 by maintainers)

Most upvoted comments

I also expect that now that we have the IDE integration in place, we will be able to be a be more organized in trying to improve the F# compiler service performance. Although I expect we may need to implement a bunch of performance telemetry so that we can start to rigorously collect data.

For what it’s worth I confirmed @vasily-kirichenko’s hunch by setting and hitting a breakpoint at the line he highlighted while typing in an F# file.