-
Notifications
You must be signed in to change notification settings - Fork 789
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
Type providers usage of FSharpCoreAssemblyVersion is resulting in large LOH allocations and UI delays inside of VS #5930
Comments
This is very similar to #5931 I think, in that this is probably reading FSharp.Core.dll? |
did some manual counts by debugging some tests in the TPSDK, and the big hit seems to be the Some numbers:
Sizes are in bytes, but the effect seems to be apparent. This should be a one-time hit because these module readers are held in a cache, but /shrug to that. |
There's ... a lot going on in the Type Provider SDK that probably ought not to be. The offending function(s) involved all allocate huge |
That piece of code in the TPSDK doing byte array comparison has already been fixed https://github.com/fsprojects/FSharp.TypeProviders.SDK/pull/284/files#diff-7c540ae6a67f14c48d0403e7b021fc86R6646, we just need to update the various type providers to use this. There are still too many ILModuleReader being created (we can save them in a time cache) but the aove should fix most things. |
Hmmm, but it's still cracking open FSharp.Core and mscorlib/System.Runtime/netstandard and reading them into big bytes arrays just to find information that the compiler should already have. I suppose that's a bigger change though. |
Correct. |
Okay. I'll create an issue on the TPSDK since this ultimately a concern over there. |
Trace: https://developercommunity.visualstudio.com/content/problem/379653/vs-slow-typing-and-hang-1.html.
GC Rollup By Generation
Type Providers usage of FSharpCoreAssemblyVersion in the above trace is causing 250 MB of LOH allocations:
The text was updated successfully, but these errors were encountered: