[whatwg] Proposal for separating script downloads and execution

John Tamplin jat at google.com
Thu Feb 10 14:16:18 PST 2011

On Thu, Feb 10, 2011 at 5:09 PM, Bjoern Hoehrmann <derhoermi at gmx.net> wrote:

> Yes, but it's a long way from there to saying that "parsing" must be a-
> voided because parsing is inherently slow. As it becomes more common to
> load very large libraries where you don't actually use most things, or
> use them only much later, it may also be that your "parser" simply does
> too much work up-front. I have no idea, I just don't think saying we
> should not look at individual factors in finding a proper optimization
> is the best approach.

This is all arguing about semantics.  The point is the current mechanisms
for handling scripts are insufficient, and on mobile phones in particular
the process of reading the contents of a script tag (whether you call that
parsing, executing definitions, or whatever), is way too slow and interrupts
the UI.  This problem has driven crude hacks like the comment hack, which in
fact precludes the browsers every getting smarter about doing the
parsing/etc in the background or during idle time.  This proposal is about a
way to hint to the browser that only the download part should happen now,
and the parsing/execution of the downloaded script will happen later, which
in fact enables smarter browsers to make smarter decisions.

John A. Tamplin
Software Engineer (GWT), Google

More information about the whatwg mailing list