注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

神魔破杜梓的叨叨堂

Programming every day!

 
 
 

日志

 
 
 
 

mouseEnable 以及 mouseChildren对CPU的影响  

2008-08-01 15:31:15|  分类: My Tech |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
原文来自natejc's blog

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!

mouseEnable CPU Test swf

demo | source


  评论这张
 
阅读(558)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017