简体   繁体   中英

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 already 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)

有一个关于jQuery团队性能改进的官方页面,也许这是一个好的开始: http//jquery14.com/day-01/jquery-14#backwards

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM