Friday, January 23rd, 2009

webkitMobile.dojo.js: shrink it up

Category: Mobile

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:

  1. Moving to a QSA-only version of dojo.query()
  2. Being able to use intrinsics for dojo.forEach, etc.
  3. Dropping IE and FF-specific rendering, XHR, and style hacks
  4. 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).

Posted by Dion Almaer at 5:17 am

3.2 rating from 18 votes


Comments feed TrackBack URI

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.

Comment by nunziofiore — January 23, 2009

This is outstanding. Nice work Alex!

Comment by davidwalsh83 — January 23, 2009

Is this going to be a sustainable branch…is the dojo dair team going to pick this up?

Comment by Detroitpro — January 23, 2009

Leave a comment

You must be logged in to post a comment.