[whatwg] Proposal for separating script downloads and execution

Kornel Lesiński kornel at geekhood.net
Tue Feb 8 15:33:09 PST 2011


On Tue, 08 Feb 2011 16:06:52 -0000, John Tamplin <jat at google.com> wrote:

> I am not on the GMail team, but we did see similar issues on the GWT  
> team --
> simply parsing the downloaded script takes a lot of time and interferes  
> with user interaction with the UI, so as awkward as it seems,  
> downloading the
> script in a comment in the background, and then evaluating it when needed
> does provide a better user experience on mobile devices.
>
> See
> http://googlecode.blogspot.com/2009/09/gmail-for-mobile-html5-series-reducing.html
> for the official blog post about this technique.
>
> So, I think you should consider having download / parse / execute be
> separate if you are going to go to the trouble to do anything.

Isn't this just a quality of implementation issue? Parsing doesn't have to  
block UI events — only execution needs to, but execution of script that  
does nothing but declare functions can be very fast.

Also speed of devices and quality of JS implementations improves, so this  
problem may eventually disappear.

-- 
regards, Kornel



More information about the whatwg mailing list