English 中文(简体)
Raphael.js -- -- 剧本看起来很轻,但处决很重 -- -- 为什么?
原标题:Raphael.js -- the script seems light, but the execution is heavy -- why?

我在Windows XP上使用Raphael 2.

我尝试过连续的物体运动(不是Tween 动画 ) 。 我认为我的脚本是轻轻的, 但个人电脑冷却扇的声音会响亮!

我想知道原因和解决办法。

(步骤)

  • 我在文档中设置了多个圆形对象(5至10)。

  • 他们继续前进。当他们碰到文件的边缘时,他们返回(向相反的方向移动),但他们的动作会减慢。

  • When I check the PC s load in Google Chrome s task manager, the memory usage becomes bigger and bigger (40MB ===> 150MB ===> ... )

(上标)

http://jsfiddle.net/JsL46/3/

抱歉。 当我将代码粘贴到“ Jsfidle” 时, 对象会出现, 但是它们不会运行 。

问题回答

RaphaelJS使用传统风格的改变和抵消进行动画,这些变化和抵消导致以下现象: "http://gent.ilcore.com/2011/03/how-not-to-trigger-layout- in-webkit.html" rel=“nofollow”>repaints and reflows 。使用SVG SMIL 动画 ,以减少浏览器对简单案例的载荷,例如>> >left/ rightmoction < a>。





相关问题
Destroying session on close of the browser from the task bar

When I close the browser window from the task bar the session is not getting destroyed. I could handle this on closing the browser using close(X) button or by pressing Alt+F4 using javascript. But ...

InvokeMethod not working on windows form

I have a windows form containing a webbrowser that navigates to a site which sends data back in the form of a table. I would like to transfer the data on that table to a application that runs some ...

Automated web browser?

For learning purposes I would like to automate some parts in a browser game, currently I am trying to fill out some simple text boxes, without any luck though. I ve created a WebBrowser component on ...

MySQL - Username to connect using Query browser

I m fairly new to my sql, and I need to know what is the default username for mysql, like in mssql you have sa . I can connect to the mysql command client but it does not ask me for a username.

Widescreen check on normal screen

I work normal screen and I develop some web application. When the application goes on widescreen some of the pages looks weired. Is there any way I can view my web page as it looks in Widescreen on my ...

How does Google get a toolbar right below the tabs in IE?

I researched through all BHO related documentation, but I just can t figure how Google gets the translation toolbar right below the tabs in IE. Any useful pointers how to achieve the same effect for ...

How to detect page zoom level in all modern browsers?

How can I detect the page zoom level in all modern browsers? While this thread tells how to do it in IE7 and IE8, I can t find a good cross-browser solution. Firefox stores the page zoom level for ...