Resource hogging

delscorcho

Newcomer
Joined
May 30, 2003
Messages
2
Hey everyone. I"ve been working on a large application suite in vb.net for some time now. Recently, i discovered that as the app is used, CPU usage steadily increases. Even when the application is in an idle state, awaiting user interaction, the CPU usage stay high. As you continue to use the app, CPU usage increases. I used a tool to analyze the CPU usage and it turns out that the main application thread is using the CPU cycles. But... none of my code is running... it's some sort of .net background work eating up all the CPU. THe application is not in an infinite loop, because you are able to use the app normally... it's just slow. If it was stuck in a block of code, it wouldn't respond.

Here's a weird phenomenon... after using the app for a while and CPU usage gets high (> 80%), things get weird. At this point, if I make the app work (legitimately use cycles), the overall system CPU usage DROPS! Then, once the application is done working and returns to an idle state, the CPU usages RISES back up to 99%! THis proves to me that it's some sort of background .NET crap that's eating up CPU time! Has anyone had problems with this?!? Is it the garbage collector? How can i stop it!?!

Thanks alot

Bill
 
Yes, its probably the garbage collector. You cant stop it, its a core part of the framework, hence the name managed for .net apps :) because it manages the memory the program uses. But as the computer needs the resources taken by gc gc should be releasing the memory and resources.
 
Yeah, but I can't imagine that all 'net apps do this. Is .NET not suited for large-scale apps? I've spent 3 months on this project... but the beta is due in a week, so it's undergoing heavy testing right now -- which is how i discovered this. There must be a solution!
 
There is a way to force garbage collection. System.GC.Collect(); But I don't know if it will help you at all.
 
Back
Top