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 685 forks source link

`InvalidateRender` unnecessarily boxes `List<T>` enumerators #16540

Open Youssef1313 opened 2 weeks ago

Youssef1313 commented 2 weeks ago

What would you like to be added

https://github.com/unoplatform/uno/blob/5a5de6cf6c0ac5d1304e3caa3916fb3482e691ca/src/Uno.UI/UI/Xaml/Application.skia.cs#L39

As ContentRoots is an IReadOnlyList<T>, the enumerator will be boxed. This is unnecessary and is easy to optimize.

image

Why is this needed

No response

For which platform

No response

Anything else we need to know?

No response