Reputation: 811
I am developing a software using C# 2.0 which uses about 200MB of memory and occasionally high CPU. The problem is, when i am leaving my machine idle for about 20-30 mins with the application running, after i come back and try to use the application, it freezes for about 2 mins, then becomes interactive.
Why does this happen? Is there any way to avoid this?
Thank you all.
Regards,
-Rakib
Upvotes: 2
Views: 4371
Reputation: 11
I know this is old thread, but I stumbled on this upon searching answer for similar problem.
For me using timer triggered renderTargetBitmap during display turn off on idle (Vista, control panel) used pretty soon all of the memory and computer freezed.
You can find more details here:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/4a4ab601-f832-49ac-aca5-1f537fec1d04
(MSDN Forums - .Net development Forums - WPF - Huge memory consumption starts after 20 minutes
Upvotes: 1
Reputation: 6273
Just a wild guess, but perhaps your app's memory pages are getting swapped out when its idle, and back in when you resume.
Either that or your UI thread is blocking on something. We'd need more details to really diagnose.
Upvotes: 2
Reputation: 3355
You could try to use some .NET Profiler to figure out what part of code or thread is causing high CPU or memory usage
Upvotes: 0
Reputation: 5113
There is no way to answer such a question with the minimal information giving.
Some guesses:
Upvotes: 0