How to reduce the CPU Usage?
-
Hi, everyone We occurs a problem that our pogram occupies a very high CPU Usage even if with no any operation on it. And we really want to know what leads to the HIGH CPU USAGE? I have searched a lot of topic about this. But... I just consider the large amount of user objects occupies the CPU. But if the large amount of user objects will cause the high CPU Usage? (NOTE:Our project has a large amount of user object of 8597.) THANKS.
//////////////////////////////
-
Hi, everyone We occurs a problem that our pogram occupies a very high CPU Usage even if with no any operation on it. And we really want to know what leads to the HIGH CPU USAGE? I have searched a lot of topic about this. But... I just consider the large amount of user objects occupies the CPU. But if the large amount of user objects will cause the high CPU Usage? (NOTE:Our project has a large amount of user object of 8597.) THANKS.
//////////////////////////////
willbin wrote:
And we really want to know what leads to the HIGH CPU USAGE?
When your code does stuff, that's all.
willbin wrote:
I just consider the large amount of user objects occupies the CPU.
No - why would it ? They occupy memory. The CPU is occupied if stuff is being done, not if stuff is in memory. Does your project have many threads ? If not, then something must be seriously wrong if your CPU maxes out when you're not doing anything. Otherwise, you have active threads, you need to work out why and if you can change that.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
willbin wrote:
And we really want to know what leads to the HIGH CPU USAGE?
When your code does stuff, that's all.
willbin wrote:
I just consider the large amount of user objects occupies the CPU.
No - why would it ? They occupy memory. The CPU is occupied if stuff is being done, not if stuff is in memory. Does your project have many threads ? If not, then something must be seriously wrong if your CPU maxes out when you're not doing anything. Otherwise, you have active threads, you need to work out why and if you can change that.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog