C#C
C#4y ago
hugeman

❔ Release mode garbage collection is much longer than debug mode

I built a WPF app, and to test the lag, i'm just selecting a ListBoxItem and moving my mouse up and down (which generates lots of garbage due to WPF).
When i build my app in debug mode and run it in VS, the garbage collection is almost instant and there's practically no spikes or stoppages when constantly changing the selected item. But when i build it in release mode, every half a second there's a spike for about 600ms or so. What could be causing this? (I added a small progress bar to show the memory usage, and the usage drops after the large spikes in Release mode, but in debug mode it's like it just randomly drops)
Was this page helpful?