unoplatform / uno

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
https://platform.uno
Apache License 2.0
8.45k stars 686 forks source link

perf: Avoid boxing in ContainerVisual.SetMatrixDirty #16541

Closed Youssef1313 closed 2 weeks ago

Youssef1313 commented 2 weeks ago

GitHub Issue (If applicable): closes #

PR Type

What kind of change does this PR introduce?

What is the current behavior?

The scenario being profiled is rapid window resizing, which will keep invalidating render.

Previously, this caused a lot of boxing and also SetMatrixDirty is taking up a lot of CPU time.

image

image

What is the new behavior?

image

Boxings are gone completely, and SetMatrixDirty is taking much less CPU time.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

unodevops commented 2 weeks ago

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16541/index.html

unodevops commented 2 weeks ago

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-16541/index.html