[whatwg] Proposal for separating script downloads and execution

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.

-Boris

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