Major compiler slowdown due to changes in .NET GC between .NET 7 preview2 and .NET 7 preview3
See original GitHub issueBuild.cmd -c Debug
is getting stuck for some time (5+ minutes on my local machine) on generating tables:
327 shift/reduce conflicts
393 reduce/reduce conflicts
consider setting precedences explicitly using %left %right and %nonassoc on terminals and/or setting explicit precedence on rules using %prec
writing tables to log
1881 states
326 nonterminals
205 terminals
1087 productions
#rows in action table: 1881
I’ve seen reports of this from other people, we should investigate. Can reproduce it roughly every other clean build.
Update 1: Also, after terminating the build, and doing it again (without cleaning), it is stuck here for about 10 minutes already:
FSharp.DependencyManager.Nuget -> C:\Users\vlza\code\fsharp\artifacts\bin\FSharp.DependencyManager.Nuget\Proto\netstandard2.0\FSharp.DependencyManager.Nuget.dll
Update 2: From the dump, it appears it spends a lot of time here:
C:\Users\vlza\code\fsharp\.dotnet\dotnet.exe "C:\Users\vlza\code\fsharp\.dotnet\sdk\7.0.100-preview.7.22377.5\FSharp\fsc.dll" @"C:\Users\vlza\AppData\Local\Temp\tmp1a940496fb5f480798d2a8cccb94abe4.rsp"
Issue Analytics
- State:
- Created a year ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Performance Improvements in .NET 7
NET 7 is fast. Really fast. This post deep-dives into hundreds of performance improvements that contributed to that reality.
Read more >OpenAI-fsharp and F# Backend Web Frameworks
Major compiler slowdown due to changes in .NET GC between .NET 7 preview2 and .NET 7 preview3 · Issue #13730 · dotnet/fsharp ·...
Read more >F# Weekly #5, 2023 – OpenAI-fsharp and F# Backend Web ...
Major compiler slowdown due to changes in .NET GC between .NET 7 preview2 and .NET 7 preview3 · Issue #13730 · dotnet/fsharp ·...
Read more >Fable with TP, Falco.Markup and new F# Kata - General
Major compiler slowdown due to changes in .NET GC between .NET 7 preview2 and .NET 7 preview3 .NET SDK 6.0.400 and 7.0.100 previews...
Read more >.NET 7 Preview 3 Is All About Native AOT - ...
Microsoft's new .NET 7 Preview 3 showcases native ahead-of-time (AOT) compilation, a much-requested and long-awaited feature for .NET ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@En3Tho I’d advise against analysing too much at this stage. Whatever else, the GC was handling this application (the F# compiler) beautifully before and it seems to me that simply too much has changed in the GC and much more caution is now needed - in particular there has to be an easy fallback to get the old characteristics, and I’d also question whether region collecting should be on by default. In any case methodologically we just need to focus here on finding a way back to the rock-solid reliable performance we’ve had for the last 15 years.
One relevant factor is that the application turns on Batch mode.
@vzarytovskii @KevinRansom You might want to look at turning on ServerGC (or undoing the update to .NET 7 preview 7 back to preview 2) so that we are able to work in this repo
@mangod9 said this isn’t possible via runtimeconfig in preview7.
Turning server mode on should be possible
export DOTNET_gcServer=1
set in the build should do the trickThis has been fixed by .NET team