[whatwg] Proposal for separating script downloads and execution

John Tamplin jat at google.com
Tue Feb 8 23:19:01 PST 2011

On Tue, Feb 8, 2011 at 11:26 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:

> You don't need to be more efficient to avoid freezing the UI.  You just
> have to not do the parsing work in a single shot on the main thread. You can
> either break it up (cooperative multitasking, effectively), or put it on a
> separate thread (preemptive multitasking).  None of that is limited by the
> hardware of the device, really.

Well, there is only a certain amount of processing power to go around.  No
matter how well it is implemented, time spent parsing is time that can't be
spent doing other things if the app is pushing the client to the limit, and
it makes sense to let the app provide hints of when is a good time to spend
that effort and when isn't a good time.

And that is completely separate from the fact that today's implementations
aren't perfect and do have significant user-perceived slowdowns from
parsing.  So in the world that exists today, those hints are even more
useful -- in fact without them, you wind up with crude hacks that *do*
prevent smarter browsers from doing things ahead of time like the comment

I am not sure I understand why you are so opposed to providing a mechanism
for an application to tell the browser it would like the parsing to not
necessarily be performed immediately on a downloaded script.

John A. Tamplin
Software Engineer (GWT), Google

More information about the whatwg mailing list