dotnet / dotnet/wpf

Performance of net7 is worse than net6 in WPF controls (at least)

Open
#7,388 0 comments 8 reactions 1 assignee Assigned to @dipeshmsft View on GitHub
Investigate Performance
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

After upgrading a WPF benchmark application from net6 to net7 I noticed the performance got slightly degraded. The difference is not huge, but since it affects all the ui the impact can be big, and really unexpected.

[WPFGridsBenchmark (2).zip](https://github.com/dotnet/core/files/10269290/WPFGridsBenchmark.2.zip)

To reproduce the issue please follow the next steps.

1. extract the application
2. Build it in "Release" configuration
3. Run it by clicking the exe (instead of debugging from VS)
4. Maximize the app
5. Click "Run all tests" button.
6. Close the app
7. Edit "C1GridsBenchmarkUsingNuget" to target net7 `net7.0-windows`
8. Repeat the same steps

In the same directory as the exe there will be some xls files created by the application

![image](https://user-images.githubusercontent.com/17496741/208691684-2cae3f35-d53a-43d2-af5f-0584d53c94fe.png)

![image](https://user-images.githubusercontent.com/17496741/208691808-aa610c21-e6cf-45c1-bade-7cdf923da522.png)

Notice the performance got degraded in almost all the cases in all the grids.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.