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: Thu, 10 Feb 2011 22:12:18 -0500
Message-ID: <4D54A912.9060109@mit.edu>
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.

-Boris
Received on Thursday, 10 February 2011 19:12:18 UTC

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