W3C home > Mailing lists > Public > public-webapi@w3.org > January 2007

Re: Progress event spec

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 26 Jan 2007 23:11:04 -0600
Message-ID: <45BADEE8.1030904@mit.edu>
To: Joćo Eiras <joao.eiras@gmail.com>
CC: Web APIs WG <public-webapi@w3.org>

Joćo Eiras wrote:
> If I'm downloading say 50kb, how many times will the progress event fire 
> ? Now if I'm downloading 1MB how many times will it fire ?
> I doubt it'll fire every byte, else listening for this event will 
> consume enormous amounts of cpu. I too doubt it'll fire every kilobyte, 
> else the previous scenario will easily apply on a fast connection. I 
> doubt it'll fire every megabyte, else it'll be useless for slow 
> connection or files smaller than 1mb.
> Please don't tell me it's implementation defined, else interoperability 
> will be the same old headache for minoritary browser vendors.

I would hope it depends on how fast the data arrives, with the event 
firing as it comes in.  Which depends on the connection speed, HTTP 
packet sizes, etc.

If data is sent in 5KB packets, the event can't fire more often than 
once every 5KB, no?

So I would hope that the spec says that not only is this implementation 
defined but may differ depending on the actual network connection in use....

Given that even a single UA couldn't really guarantee anything here (see 
above), I doubt anyone will ever seriously depend on the exact number of 
times this fires.

That said, people _might_ depend on it actually firing once data comes 
in (e.g. to provide a useful progressmeter), but even then, if you get 
all the data in a single (possibly huge) packet, there's not much you 
can do.  And the UA has no control over that.

-Boris

P.S.  The above opinions are my own; I represent no one here.
Received on Saturday, 27 January 2007 05:11:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:56 GMT