Friday, January 23rd, 2009
webkitMobile.dojo.js: shrink it up
<p>It turns out that Alex was responds in detail on his own work. He was playing around with the question:What would Dojo look like if it was WebKit only?
He ended up with webkitMobile.dojo.js which is 26-29% smaller (depending on compression).
The big size wins (in decreasing order) were:
- Moving to a QSA-only version of
dojo.query()- Being able to use intrinsics for
dojo.forEach, etc.- Dropping IE and FF-specific rendering, XHR, and style hacks
- Using a common closure wrapper for the entire core
And there’s even more fruit on the vine. I think without too much more work I’ll be able to drop the current animation system in favor of pure CSS animations and can significantly simplify the XHR code which doesn’t do the straightforward thing to avoid terrible memory leaks on IE and very old versions of FF.
It is great to see the mobile Web kick up so strong recently. I am a little torn on WebKit becoming all powerful king (“which WebKit?”) even though it is open source (and has many vendors in there to keep Apple honest), so it will be good to see if there is any real competition in the future (Disclosure: I work for Mozilla which is working on a mobile browser, Fennec).
Related Content:











this is a great news.. I m studing solution like PhoneGap for interoperability between different device… this could be an interesting ipothesys…
IMoogle dev team.
This is outstanding. Nice work Alex!
Is this going to be a sustainable branch…is the dojo dair team going to pick this up?