Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's good to know that this situation will lead to improvements in jQuery.

However, I'm disappointed in how twitter, or more accurately, Dustin Diaz handled this situation. They identified some performance issues. Narrowed it down to a jQuery version but just left it there.

jQuery is open source so they could have done some investigating on their own and tried to narrow down what changed in that selector. Especially since this change was blogged about (as mentioned by John).

Not to mention various people helped out twitter by finding some pretty obvious flaws and made suggestions. Twitter has a lot of resources and I'm assuming a lot of talented Javascript engineers. This is a situation where they could have used their resources to contribute to an open source project instead of the other way around.



I'm on the jQuery core team. As you might guess, when a high-profile site seems to be having troubles with jQuery, we want to fix it whether it involves a bug fix or tutorial help.

It would really help us out if people could slip our pre-release versions into their test environments. There's a 1.5 beta available now (http://blog.jquery.com/2011/01/14/jquery-1-5-beta-1-released...). Don't wait several months to try it the way Twitter waited on 1.4.4, or we may ship 1.5 with some bug that impacts your site.


Deployed on production already (http://cdn.mybucket.co/static/js/jquery-1.5b1.mini.js). I minify it using Crockford's jsmin script.

We happened to use http://www.infinite-scroll.com, which also bind to window scroll event as well. Let's see how it goes.

Thank you so much for all the hard work that goes into jQuery.


I don't think it's fair yet to say that Twitter won't do these things. The first step was fixing the regression as fast as possible.


And the second step was writing a highly-visible blog post slagging the free code they use in their many-million-dollar website before they actually understood the problem?


Exactly.

It's not hard to pinpoint the exact line of code that is causing the slow down and come to a conclusion. This could have easily been fixed without reverting to jQuery 1.4.2 and risk breaking other things in the process (assuming they upgraded to 1.4.4 for a good reason).

On top of that it was their own code which led to the slowdown. Passing the blame to jQuery seems wrong when it was their own mistake to disregard best practices.

Here is where Twitter failed:

1) Need better testing when updating a version of the library.

2) Need to understand what the library you are using is doing and how to avoid performance bottlenecks.

Basic stuff.


Well there's not much else to do. It seems other people did most of the work for them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: