Open teh173 opened 4 years ago
We found that this was mainly an issue when debugging an app through Visual Studio and that disabling the in-app toolbar in the Live Visual Tree helped prevent this issue.
It is not related to i-app bar. The issue could be reproducible with the template project. Please refer to vedio in #4265 https://github.com/dotnet/wpf/issues/4265#issuecomment-843365764
Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
Problem description:
A WPF window and image seem to take a massive amount of memory compared to an equivalently sized window in UWP.
Possibly related issues:
I noticed encountering this issue as well, when resizing a WPF window, the Dedicated GPU usage column continually goes up in Task Manager. I guess it's a Task Manager bug but I'm wondering why it's manifested by WPF here. https://support.microsoft.com/en-us/help/4490156/windows-10-1709-gpu-process-memory-counters-report-incorrect-values Also see a lot of page faults.
Minimal repro:
Test apps for WPF and UWP
WindowMemoryTestApps.zip
Compare the memory usage in WPF vs. UWP
Actual behavior: On my monitor setup with 7495 x 4440 virtual screen pixels, for WPF, sizing a window to that size takes around
This is what a similar setup looks like in UWP.
Expected behavior: I would expect the behavior closer to UWP. I would expect say a (3840 x 2160 x 4 bytes per pixel) * 2 monitor setup to take 66,355,200 bytes, but WPF seems to be using many multiples of that.
Is this just an architectural limitation in WPF, or a bug?