I'm trying to profile my UWP (Universal Windows Platform) app in Visual Studio to see what is causing my Process Memory Usage to be so high.
I've been using Visual Studio's built in Diagnostic Tools and I haven't had any luck. It's been showing my Process Memory Usage at 93 megabytes while the Heap shows 12.17 MB and the Managed Heap shows 1.56 MB.
There was just another instance where my Process Memory Usage ran up to about 458 MB and kept climbing, but when I took a snapshot, it didn't tell me the values of any of the objects that should of been causing it, and the actual memory it claimed to be using was so much less than the Process Memory.
I'm not sure if I just don't understand how the profiler works, or I'm just doing something completely wrong entirely.
The simple answer is - even though your app is written in C# - it still allocates large amounts of native memory.
Typically bitmaps you load in an app use most memory, so I would start looking into reducing the number and resolution of bitmaps you have in your memory and making sure they don't leak.
Second - make sure your lists are virtualized. If you load 1000 images in memory - even if they are small they will still use a lot of memory. By default - list controls like ListBox
, ListView
or GridView
are virtualized, unless you put them in a ScrollViewer
or change the default ItemsPanel
to one that isn't virtualized.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With