mouseEnabled and mouseChildren Affect CPU Load
I was reading a post from Keith Peters today and noticed a comment made by Ryan Taylor mentioning that mouseEnabled and mouseChildren affect the CPU load. I had to know if this was true or not so I promptly created an experiment app. The app randomly creates 700 parent sprites and 700 nested children sprites. You press the SPACE bar to toggle .mouseEnabled and .mouseChildren for all of the objects.
I couldn’t believe it. Although disabling these properties did not seem to affect the FPS, it definitely affected my CPU. When tested on my WinXP,SP2 machine with a P4 3.4 HT CPU, the swf was taking 13-16% of my CPU. When I set mouseEnabled and mouseChildren = false, the CPU load dropped to 4-6% total! It cut down the CPU usage by about 300%! Very good to know. Thanks for the tip Ryan!
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.
Confirmed that’s pretty sick and good to know, thanks for the demo.
FPS stayed roughly the same, but CPU usage went from ~50% to ~10%!
also
Number is faster then uint…. dont remember where I read this.
Btw good article. \
here on my HP dv3667nr (turion x2 1.9 64 bits, 2gb ram, flashplayer 10, firefox, windows vista)
~8% enabled ~1%disabled