W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2011

[whatwg] Proposal for separating script downloads and execution

From: Kornel Lesiński <kornel@geekhood.net>
Date: Tue, 08 Feb 2011 23:33:09 -0000
Message-ID: <op.vqlydkq8te2ec8@aimac.local>
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
Received on Tuesday, 8 February 2011 15:33:09 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:30 UTC