Code:
There are a couple procs pertaining to the topic
Problem description:
I would just like to know a couple of things:
Can anyone explain what "Real Time" is on the profiler?
What is self cpu vs total cpu?
Are there anyone ways/tips anyone could give me to lower the self cpu and total cpu.
Realtime is kind of iffy on whether you need to decrease it or not, some procs are naturally going to take a long time to finish executing (if they ever finish).
For decreasing CPU you just optimize your code as much as possible, reduce the processing required as much as you can. |
Alright great. One more question...Using spawn() rather than sleep, does that effect cpu in anyway. I think it does..
|
In response to Mav472
|
|
Mav472 wrote:
Alright great. One more question...Using spawn() rather than sleep, does that effect cpu in anyway. I think it does.. If used correctly the cpu usage difference between sleep() and spawn() should be hardly anything. However, in practice they are not interchangeable. Both of them have their own specific uses, and the use of either one in place of the other could have unintended results. |
'Real time' is the amount of time it takes for a proc to execute (in ms) including procs called within those procs. This means procs with loops that take a while will cause this number to be high. 'Self time' is the time it takes for the proc to execute EXCLUDING procs called within it.
Self CPU and Total CPU are similar, self CPU is how much CPU the proc eats on its own, and total CPU is how much it uses with proc calls included.