Skip to content
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

WPF element rendering is 20% slower on .NET Core 3.0 than on .NET Framework #2107

Closed
topsterde opened this issue Oct 24, 2019 · 2 comments
Closed

Comments

@topsterde
Copy link

  • .NET Core Version: 3.0.0
  • Windows version: Windows 10 x64
  • Does the bug reproduce also in WPF for .NET Framework 4.8?: No

Problem description:

The attached demo runs on the .NET Framework five seconds and needs 230 MB memory.
The .NET Core 3.0 version is 1 second slower and need 15 MB more memory.

This issue is not related to: #94

Actual behavior:
Slower perfomance and more memory consumption than .NET Framework

Expected behavior:
Better performance and less memory consumption with .NET Core 3.0

Minimal repro:

PerformanceWpfCoreVsFramework.zip

@0xd4d
Copy link

0xd4d commented Oct 24, 2019

Your code includes startup time. Add a button that starts the timer and executes the code each time it's pressed.

Most of the DLLs on .NET Framework are already ngen'd so you won't see much compilation. The .NET Core 3.0 code seems to be crossgen'd but the jitter still compiles lots of code. eg. 445 methods in PresentationCore.dll are compiled vs 10 in .NET Framework.

You can see this yourself if you use PerfView and open Advanced Group -> JITStats.

  • net48: 16.9 ms jitting code
  • core3: 613.3 ms jitting code (fg 117.6 ms, TC bg 495.7 ms)

@rladuca
Copy link
Member

rladuca commented Oct 24, 2019

@topsterde @0xd4d We have already filed a bug on CoreCLR for addressing perf concerns between crossgen and ngen.

Can you please upvote, comment, and add your reproduction links to: https://github.com/dotnet/coreclr/issues/26438?

That will help indicate the importance of the issue.

Thanks!

@grubioe grubioe closed this as completed Oct 24, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Apr 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants