I’ve been a fan of the Slickspeed Selectors test for a while – in all honesty it’s probably the coolest thing Mootools has released (and this isn’t a knock on their js framework). The Slickspeed selectors test does everything right – easy, friendly open-source code which is stupid easy to customize. The tests are extremely useful and can give you some amazing insight on how the framework you’re using for your app compares to the other ones that are out there (and you can even test on your own code!).
After a discussion at work today about how expensive Prototype’s $$ function is in the lovely Internet Explorer, I decided to run the Slickspeed tests in IE7 – something which I’m a little embarrassed to admit I’ve never done before. I knew the results would be bad – but seeing just how bad they were made my stomach turn. It also piqued my curiosity to dig into this some more.
With the preset settings and my own custom frameworks (I chose Prototype 1.6.0.2, 1.6.0.3, and jQuery 1.3), both Prototype’s came in at over 2 seconds (2142 and 2169ms, respectively). Granted, I’m running my IE’s on a VM powered by a nearly 2 year old MacBook, but an ‘average’ website visitor is probably powered by something on a similar level.
To pour some salt in the jQuery vs Prototype war, jQuery’s results are in a whole ‘nother division, coming in at 386ms. While it really burns me to knock on Prototype, I can’t look at the framework and not see it’s downward spiral into disrepair. It’s only glimmer of hope is the strange fact that 1.6.0.3 performs extremely well in Safari, but at 5-7% of the market, that really don’t mean squat. Not when IE7 is that pathetic.
Deciding to dig a bit deeper, and take advantage of the true customization allowances of the Slickspeed tester, I decided to actually use some real code from the Zenbe app. So I took the source code of one of the frames, changed the selectors list to mimic some of the ones we call frequently, and ran the test again.
The results were similar, but on a slightly smaller scale (the default testing document they provide is somewhat heavy, and does include a lot of CSS3 selectors which most devs never use). However, the ratio of difference between Prototype and jQuery is astonishing (like 400% faster astonishing), and even moreso is the fact that in IE7, 1.6.0.2 outperforms 1.6.0.3.
I’m not going to get into my thoughts on what all of this means for Prototype, that’s another blog post (or two…), but I hope this post encourages developers to try Slickspeed out on their own site, and see how your JavaScript framework is treating you compared to others.
0 Responses to “A dose of reality with Slickspeed”
Leave a Reply