The unused opens diagnostic analyzer is implemented in a way that is not sufficiently performant, particularly for large files.
When using 15.6, you will see long delays before error lists red squigglies are updated.
When using 15.7 previews, you will see either long delays before error lists/red-squigglies, or just unnecessary CPU load, depending on whether #4369 has been fixed
Repro
- Open FSharp.sln. Go to IlxGen.fs.
- Make an edit. Wait for red squigglies.
- Repeat, measuring update time
Possible Cause
From quick profiling it looks to me like some of the code here may be quadratic or worse

https://github.com/Microsoft/visualfsharp/blob/52391ed77b1f185d9d51b2e022961e44600f8ae0/src/fsharp/service/ServiceAnalysis.fs#L96
Workaround
It should be possible for us to make this performant. But until then when using large files (> 500 lines?) I'd say it's best to turn this analyzer off by default until we get to the bottom of this.

The unused opens diagnostic analyzer is implemented in a way that is not sufficiently performant, particularly for large files.
When using 15.6, you will see long delays before error lists red squigglies are updated.
When using 15.7 previews, you will see either long delays before error lists/red-squigglies, or just unnecessary CPU load, depending on whether #4369 has been fixed
Repro
Possible Cause
From quick profiling it looks to me like some of the code here may be quadratic or worse
https://github.com/Microsoft/visualfsharp/blob/52391ed77b1f185d9d51b2e022961e44600f8ae0/src/fsharp/service/ServiceAnalysis.fs#L96
Workaround
It should be possible for us to make this performant. But until then when using large files (> 500 lines?) I'd say it's best to turn this analyzer off by default until we get to the bottom of this.