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

[whatwg] Proposal for separating script downloads and execution

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 08 Feb 2011 19:44:13 -0500
Message-ID: <4D51E35D.2000805@mit.edu>
On 2/8/11 7:31 PM, Kyle Simpson wrote:
> No, frankly it isn't. No matter how good the implementation of the
> JavaScript engine on mobile, the mobile device will always be much more
> limited in processing power than a desktop browser environment.

That's not what the question was about.

> It's also tempting to just get mired down in this one use-case of mobile
> JavaScript parsing deferral. While this use-case is a great example of
> why controlling execution is important, there are plenty of other
> use-cases for loading a script ahead of time and not using the script
> (parsing/executing it) until later (or sometimes never).

The thing is, if a browser is idle, why shouldn't it go ahead and parse 
the script?  That way when you want to execute it there's no sudden UI 
pause as the script is parsed.  I'd think this would be preferable, in 
fact.  So I'm opposed to any proposal that forbids browsers to 
parse/compile/whatever scripts whenever they want to, assuming you can 
detect when they're doing it.  If you can't detect it, of course, such a 
requirement is vacuous to start with.

Received on Tuesday, 8 February 2011 16:44:13 UTC

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