You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notes:
Disabling nullables in the generated files seems to fix the issue. It builds on Linux and it's faster on Windows. Note that there is a significant difference between Windows (80s) and Linux (20s), but maybe it's related to GitHub runners.
I wonder if there is something in Roslyn that could be improved or if I should update the code generator to use another pattern.
Note: This code was just a first experiment to create my project. My final code doesn't use this logic as it has multiple drawbacks (IDE is not usage, JIT takes too much time).
The text was updated successfully, but these errors were encountered:
A quick hack you could try is to split all these TryAdd calls into multiple methods and see if it improves performance. I'm not confident it will work, but I think it's worth trying.
Version Used: '4.12.0-3.24570.6 (913fb4e)'. Language version: 13.0.
Steps to Reproduce:
The repro has one large generated file (~160k lines) with
#nullable enable
at the top. Most lines add an entry in aConcurrentDictionary
.git clone https://github.com/meziantou/repro-roslyn-nullable-largefile
dotnet build
The problematic file is https://github.com/meziantou/repro-roslyn-nullable-largefile/blob/main/HstsDomainPolicyCollection.g.cs
Expected Behavior:
The application builds without using more than 16GB of RAM
Actual Behavior:
Notes:
Disabling nullables in the generated files seems to fix the issue. It builds on Linux and it's faster on Windows. Note that there is a significant difference between Windows (80s) and Linux (20s), but maybe it's related to GitHub runners.
#nullable disable
): https://github.com/meziantou/repro-roslyn-nullable-largefile/actions/runs/12507199016I wonder if there is something in Roslyn that could be improved or if I should update the code generator to use another pattern.
Note: This code was just a first experiment to create my project. My final code doesn't use this logic as it has multiple drawbacks (IDE is not usage, JIT takes too much time).
The text was updated successfully, but these errors were encountered: