-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Queryable.Where causing performance issue in .NET 6 #66076
Comments
Tagging subscribers to this area: @dotnet/area-system-console Issue DetailsDescriptionFind time taken for same code between .NET5 and .NET6 in simple console app. .NET 5 .NET 6 Originally we found this problem in Blazor and later re-created in simple console app. Replication steps:
Configuration
Regression?Yes. Just change the target framework to .NET 5 in the provided console app sample. It took only 200 milli secs. Data.NET 5 .NET 6
|
Tagging subscribers to this area: @dotnet/area-system-linq Issue DetailsDescriptionFind time taken for same code between .NET5 and .NET6 in simple console app. .NET 5 .NET 6 Originally we found this problem in Blazor and later re-created in simple console app. Replication steps:
Configuration
Regression?Yes. Just change the target framework to .NET 5 in the provided console app sample. It took only 200 milli secs. Data.NET 5 .NET 6
|
It takes
Can you provide a simpler PoC ? |
@Neo-vortex while running the provided console project in my machine, it's taking 54658 in .NET 6 and 396 milliseconds in .NET 5. Please refer below screenshots.
|
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsDescriptionFind time taken for same code between .NET5 and .NET6 in simple console app. .NET 5 .NET 6 Originally we found this problem in Blazor and later re-created in simple console app. Replication steps:
Configuration
Regression?Yes. Just change the target framework to .NET 5 in the provided console app sample. It took only 200 milli secs. Data.NET 5 .NET 6
|
It is large method (~250kB of native code in both .NET 5 and .NET 6). |
This is the hot callstack in .NET 6
|
I've reproduced and localized the issue: if in
|
Also, I don't know if it was obvious or not, I'm kinda new to the project, but there is no difference in IL code between net5.0 and net6.0 of I was using the standard Rider IL viewer. Are there any other good viewers for Linux? |
|
cc @dotnet/jit-contrib. |
|
If it might help, I've reduced proof of concept to 50 lines of code. |
Method has a long, skinny dominator tree with every branch potentially redundant. This leads to quadratic behavior in the redundant branch optimizer. |
Description
Find time taken for same code between .NET5 and .NET6 in simple console app.
.NET 5
Time taken 210.2811 milliseconds
.NET 6
Time taken 79274.2204 milliseconds (more than 7 secs)
Originally we found this problem in Blazor and later re-created in simple console app.
Console App.zip
Replication steps:
Configuration
Regression?
Yes. Just change the target framework to .NET 5 in the provided console app sample. It took only 200 milli secs.
Data
.NET 5
Time taken 210.2811 milliseconds
.NET 6
Time taken 79274.2204 milliseconds (more than 7 secs)
The text was updated successfully, but these errors were encountered: