15.7.1
git clone https://github.com/fsprojects/FSharp.Data.SqlClient.gitcd FSharp.Data.SqlClientbuild BuildSqlClient.slnDesignTime.fs file
Looking at the reactor logs:
DesignTime.fs is checked instantly I think something wrong with caching background check results: the huge ProvidedTypes.fs seems to be rechecked every time on any ParseOnCheckFileInProject call.
Reactor: 77,745.864 BAD-BG-SLICE: >3s <-- background step, took 3982.1349ms
Tested on the latest nightly build: the same.
Tested on VS 2015: the same o_O
It turns out the problem is not caused by ProvidedTypes.fs. I've created a minimal repro: https://github.com/vasily-kirichenko/SlowTypecheckRepro

Settings:



Maybe amount of overloads in some types of this assembly?

@smoothdeveloper maybe.
Does anybody remember a packages with a type with LOTS of overloads?
Yes overload resolution is sloooooow
Vasily Kirichenko notifications@github.com schrieb am Di., 22. Mai 2018,
12:53:
@smoothdeveloper https://github.com/smoothdeveloper maybe.
Does anybody remember a packages with a type with LOTS of overloads?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/visualfsharp/issues/4961#issuecomment-390948358,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNOcL7wPY8uTNQoPGRFNeLZP-A4LJks5t0-4lgaJpZM4UHi0b
.



Why Visit is non optional:

even though it's virtual, not abstract:

can you see what part of isexactmatch is slowest?
from very quick review I can see that CompiledSigOfMeth is called with same arg in IsExactMatch and in IsPartialMatch
and in IsTyparKindMatch
Yes, I've optimized away the double call of CompiledSigOfMeth. But I think the problem is that all _virtual_ methods are checked (> 1000), because for abstract classes all methods are marked as required to implement:
What if filter dispatch slots by minfo.IsAbstract = true?
Found this https://github.com/Microsoft/visualfsharp/blob/master/src/fsharp/MethodOverrides.fs#L320
This is iteration over dispatchSlots, which is done inside List.iter over the same dispatchSlots, so for 1K overloads, IsExactMatch was called up to 1M times :(
1000 overloads. My oh my.
Looks like they are doing something like a discriminated union - just without DUs in the language.
I do have a project with an often used create method with over 300 overloads (use case interoperability with c# for otherwise inlined methods). Can I help with testing something? I do have issues with performance in general and completion, quickinfo and colouring specifically. It may be related.
@abelbraaksma just install the nightly vsix and try https://blogs.msdn.microsoft.com/dotnet/2017/03/14/announcing-nightly-releases-for-the-visual-f-tools/
Most helpful comment
With https://github.com/Microsoft/visualfsharp/pull/4971