Click here to Skip to main content
15,847,748 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
An application takes 30% cpu time it should come down to 1-2 % CPU Time .how can i accompalish this?
Perry Bruins 13-Apr-11 5:41am    
?? What kind of application is it? what does it do when it takes 30% of the time? do you have some code to look at?

1 solution

It means it takes 30% time. :-) You can make it any percent less by inserting System.Threading.Thread.Sleep in some places. (Don't do it in any UI thread!)

You can also do it by reducing thread priority (not recommended in almost all cases; avoid it unless you understand very well what are you doing).

I think you understand me right by now: reducing CPU usage by application normally makes no sense. In some application, people struggle for utilizing more CPU (also not very reasonable criteria). You need different thing: make more work in time, and this is something different. CPU time is never a real goal.

Share this answer
girish sp 13-Apr-11 5:49am    
SAK-always your ans takes 5!!
Sergey Alexandrovich Kryukov 13-Apr-11 6:21am    
Thank you, Girish.
yeshgowda 13-Apr-11 5:52am    
Thank u for your valuable suggestion
Sergey Alexandrovich Kryukov 13-Apr-11 6:21am    
You're welcome.
Something to think about.
Your follow-up Questions and ideas are welcome.
yeshgowda 13-Apr-11 7:44am    
CPU usage is displayed in % whether it is considered as CPU time?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900