[whatwg] Proposal for separating script downloads and execution
bzbarsky at MIT.EDU
Thu Feb 10 19:12:18 PST 2011
On 2/10/11 5:09 PM, Bjoern Hoehrmann wrote:
>> And constructing whatever output model (AST, bytecode, whatever) your
>> parser produces.
> I can grant you persisting information about the structure to some point
> but generating byte code is not the job of the parser
Well, the parser has to output _some_ representation. In the case of
Spidermonkey, the parser outputs bytecode directly. In the case of V8
it outputs an AST. Constructing those takes time.
> 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.
Oh, I agree that we shouldn't take current browser JS parser behavior as
set in stone.
More information about the whatwg