![]() |
|
#1
|
|||
|
|||
CPU UsageI am running a MFC application and as soon as user interface is displayed the CPU usage reaches 100. Memory usage is not high.
Is it due to some project settings? or something related to code? Thanks in advance! Regards - Jack |
|
#2
|
||||
|
||||
Re: CPU UsageHi Jack,
Welcome to the GIDForums. Your problem may be mainly due to the code also.. Can you please show some part of it? Try enabling optimization during compiling. That may help reducing the cpu usage.. Best Regards, Paramesh. __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#3
|
|||
|
|||
Re: CPU UsageHi Paramesh!
Thanks for your reply. Can you please tell me how to enable optimization during compiling? Regards Jack |
|
#4
|
||||
|
||||
Re: CPU UsageGo to Projects->C++->Optimization.
Then select which optimization you want. i.e: Minimize size Maximize speed or Full Optimization. You can also Favor size or speed in the dialog. But also consider the code you are writing. Is there an infinite loop? The CPU usage can be because of your code too... Regards, Paramesh. __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#5
|
|||
|
|||
Re: CPU UsageActually I am using VC++ .NET
Earlier in project settings optimization was disabeled, when i m changing it to full optimization it is giving me some compatability error. Regards Prakhar |
|
#6
|
||||
|
||||
Re: CPU UsageYes. If you leave the project settings by default, it will show that /RTC1 and /0x are incompatible.
For that, you should change your basic runtime checks to default. Go to Project->properties->c++->Code generation. In the basic runtime checks, select default. And also you should change the format of your debug information. For that, go to Project->Properties->C++->General. In that, change the Debug information format as Program Database /Zi Now the code will be optimized. Enable Full optimization if you want to have both optimization in speed and size. If you dont care about the size, then enable Maximize speed only.. Again, I doubt your code... Can you please show some part of your code? Regards, Paramesh. __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#7
|
|||
|
|||
Re: CPU UsageOk...i will try that.
About the code...its actually quite big...we r developing a CAD software so it has around 8 projects and each project has many cpp files...so i dont kno which part should i show u! regards Prakhar |
Recent GIDBlog
Observations of Iraq by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| tcpsvcs.exe causing 100% CPU usage | jammm | Computer Software Forum - Windows | 21 | 12-Oct-2007 10:33 |
| no output, usage of sqrt and pow | micheldenostra | C Programming Language | 3 | 25-Sep-2005 17:32 |
| usage of seekg function | walrus | C++ Forum | 2 | 07-May-2005 15:33 |
| ADT's - Common Usage | the_crazyman | C Programming Language | 3 | 17-Jan-2005 07:37 |
| PHP/Apache memory usage issue | bacchus | Apache Web Server Forum | 0 | 18-Aug-2003 12:57 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The