[whatwg] Proposal for separating script downloads and execution

Nicholas Zakas nzakas at yahoo-inc.com
Wed May 25 08:24:34 PDT 2011


I already explained that in my previous email. Parsing and compilation on a background thread removes some of the problem but not all of it. Ultimately, even if the script is just a function waiting to be called, the browser still executes it in a blocking fashion after parsing and compilation. It's the execution that is troublesome part because it interferes with the UI. The fact that the script isn't doing much is helpful, but once again, there will be a non-zero interrupt that can affect user experience.

-N

-----Original Message-----
From: Kornel Lesiński [mailto:kornel at geekhood.net] 
Sent: Tuesday, May 24, 2011 2:33 PM
To: whatwg at lists.whatwg.org
Cc: Nicholas Zakas
Subject: Re: [whatwg] Proposal for separating script downloads and execution

On Tue, 24 May 2011 17:34:45 +0100, Nicholas Zakas <nzakas at yahoo-inc.com>  
wrote:

> Your assertion that loading a file that simply defines a function will  
> solve the problem is a bit too simplistic for most web applications.

Could you describe the case where wrapping script in a function would not  
solve the problem in UAs that parse scripts asynchronously?

-- 
regards, Kornel Lesiński


More information about the whatwg mailing list