开发者

jQuery 1.3 vs 1.4 (Performance)

jQuery 1.4 released recently and the new website shows some performance charts where 1.4 is clearly better, but has someone alrea开发者_StackOverflow社区dy done an analysis of overall performance improvement of 1.4 vs 1.3? If not, how do I profile both on my sites/pages, are there any tools?

Can't wait to find out how fast is 1.4 compared to the previous version.

Edit: A blogger did some tests and found that its about 30% faster in FF but slower (compared to 1.3) in Safari. Hmm...


Their diagrams only show one side of the story. I've recently been working on a script that involves iterating over thousands of input elements throughout the DOM tree and traversing their parent elements. According to Firebug, jQuery 1.4 runs roughly 30% slower that 1.3.2 on the exact js and DOM structure.

That's not to say that 1.4 isn't "faster" in general though, and this is only in one browser I've profiled in. I think that this time their efforts where more focused on speeding up areas that related to dynamic content creation rather than dealing with existing static elements.

Just thought I should also point that those charts list the number of function calls, not the execution time. Fewer function calls doesn't always translate to lower execution time. In my situation 1.4 executes about 20% fewer calls but runs about 30% slower.


This report says that jQuery have massive performance improvements in 1.4

http://www.stevesouders.com/blog/2010/01/15/jquery-14-performance/


Well.. After I updated jQuery for a project (with extensive DOM manipulation), I noticed an overall performance improvement. So I guess those reports are for real (or pretty close to the reality)


There is an official page about the performance improvements from the jQuery team, perhaps this is a good start: http://jquery14.com/day-01/jquery-14#backwards

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜