W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2009

Re: [XHR2] Progress events during synchronous requests

From: Jonas Sicking <jonas@sicking.cc>
Date: Thu, 12 Feb 2009 01:52:15 -0800
Message-ID: <63df84f0902120152y64711aadp2a441fc7805eb4ca@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: Webapps WG <public-webapps@w3.org>

On Thu, Feb 12, 2009 at 1:19 AM, Anne van Kesteren <annevk@opera.com> wrote:
> On Wed, 11 Feb 2009 22:44:17 +0100, Jonas Sicking <jonas@sicking.cc> wrote:
>>
>> Is there a reason why the spec says to not send progress events
>> (upload and download) during synchronous requests, while still saying
>> that readystatechange events should be fired?
>>
>> I guess it can be argued that progress events (especially the load
>> event) is less useful for synchronous loads and that not dispatching
>> them is a performance optimization. Is that the reason?
>>
>> I don't really feel strongly either way, though I do think that from a
>> web developers point of view it would be more useful to dispatch the
>> events than not to dispatch them. And being consistent with regards to
>> readystatechange is always nice.
>
> It is a performance optimization, yes. Firing a lot of progress events for a
> large file that is synchronously downloaded in a Web Worker seems like
> waste. The reason readystatechange events are dispatched is because Internet
> Explorer already did that.

At least in gecko it is not a big performance win. In fact, I doubt
that it's even measurable. I'd be surprised if this was significantly
different in other implementations.

That said, I'm personally fine with waiting to add these events until
authors start asking for them. But I suspect they will.

/ Jonas
Received on Thursday, 12 February 2009 09:52:53 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:30 GMT