-
Notifications
You must be signed in to change notification settings - Fork 711
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
Question: Why does WinUI use so much memory? #4606
Comments
I think there was a mention of a few MB more memory as WinUI has to render to a Swapchain rather than the OS compositor layer. |
@mdtauk , I suggest you have a look at the benchmark rather than speculate. WinUI is leaking a lot with exactly the same code used by UWP, and very similar code to WPF. Just one problematic detail. A 10x memory utilization increase over UWP is unsustainable. 45MB versus 700+MB is not a few MB difference! We need more hard facts and less speculation in these discussions. It's like the Pivot discussion, no facts just a lot of speculation and unsubstantiated declarations, when it would be very easy for Microsoft to publish stats of usage on GitHub or concrete details about development resources required for supporting a given feature. |
What's also noteworthy, Microsoft is not reaching out to the community for support. The Pivot control just happens to be a really good example of that. Microsoft could have given the code and styles out to the community, as is. We would have happily taken on the task of updating the styles and improving the code for reintegration were it truly such a large resource drain for Microsoft. @mdtauk , I commend you for trying to do just that! Obviously, Microsoft internal politics, motivations and objectives were more important criteria to appease than the needs of UWP/WPF developers. I don't think the community can help itself beyond shining a light on what's important until Microsoft decides to be Open (Source). @mdtauk , we're the fifth wheel. |
I suspect that a big portion of this is the known C#winrt leak. @Scottj1s |
I'll be missing .NET Native a lot... |
I wasn't doubting your findings, just adding that the team has mentioned a slight increase, so that is what we should be expecting, not the 10 times increase you are seeing. |
@mdtauk , looks like I've gotten a tad too accustomed to pushback from one specific source. Sorry for the reactionary reply. |
if you're seeing these numbers from C# it's likely to be the cswinrt leak |
@asklar , hopefully it's just that. The working set seems significantly bigger too (cursory observation). We'll see. It's easy to compare with this benchmark, so the next release of WinUI should be significantly better on perf and memory footprint. |
@StephenLPeters , any word on when this will get resolved? The GA release is still leaking memory in a big way. |
@Noemata the memory leaks have been fixed in C#/WinRT 1.2, and will be part of an upcoming update. |
@angelazhangmsft , fantastic! |
This issue has been resolved, see: microsoft/CsWinRT#413 |
Based on the tests done here: https://github.com/Noemata/XamlBenchmark
WinUI uses vastly more memory than WPF or UWP. It also appears to leak memory resources to a significant degree.
For the same test WPF uses 100MB, UWP uses 45MB and WinUI tops out at 700MB without relinquishing most of what was taken.
Why?
The text was updated successfully, but these errors were encountered: