I hear that many developers think YUI is slow. Since I don't know the reasons, you guys have any idea to prove their thoughts?

3 answers

danwellman 5600
5
points

I have never seen it described as slow, nor have I used it and found it to be slow. I've used the YUI and other JS libraries extensively. jQuery is a very fast library, but it has rcently had it's selector engine upgraded to sizzle which is ultra-efficient. YUI3 will be released soon and will probably be faster than the current version.

One thing I have seen peope talk about is the length of calls to it's API; whereas with jQuery you can chain methods onto elements directly - $("#mydiv").doSomething() with YUI the calls are namespaced and look like YAHOO.componentname.methodname("myelement") and some people don't like that.

Another thing I have seen users complain about is the fact that there is often a 'content-flicker' where the underlying elements on the page are visible in their default state for a econd or two before being transformed into widgets, but again, this isn't really the fault of the library and is more to do with the nature of progressive enhancement.

This page shows some basic metrics performed by John Resig - YUI seems to be about average (and even wins in one test!) and definately not lagging behind - jslib comparison

Answered over 8 years ago by danwellman
1
point

Is it possible that these developers are talking about YSlow, the Yahoo developed Firefox Firebug extension? YSlow analyses web pages, and suggests ways to improve performance:

http://developer.yahoo.com/yslow/

Answered over 8 years ago by Stephen Ireland
0
points

Bad coding often results in bad performance. I've used YUI a couple of times and it doesn't seem slow to me. But a quick google search pops up some questions in various forums asking 'why YUI is slow' - the answers to the questions often is that it is a result of bad coding.

Answered over 8 years ago by Dan Storm