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

Frequency Re: Progress event spec

From: Charles McCathieNevile <chaals@opera.com>
Date: Sat, 27 Jan 2007 10:25:48 -0500
To: "Boris Zbarsky" <bzbarsky@mit.edu>, João Eiras <joao.eiras@gmail.com>
Cc: "Web APIs WG" <public-webapi@w3.org>
Message-ID: <op.tmtjtapmwxe0ny@30-5-51.wireless.csail.mit.edu>

On Sat, 27 Jan 2007 00:11:04 -0500, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

>
> João Eiras wrote:
>> If I'm downloading say 50kb, how many times will the progress eventfire  
>> ? Now if I'm downloading 1MB how many times will it fire ?
...
>> 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, HTTPpacket  
> sizes, etc.
>
> If data is sent in 5KB packets, the event can't fire more often thanonce  
> 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....

It makes sense to me that the firing rate is UA dependent. Since you may  
well
have a zero-length transfer, and since that case is in principle ambiguous  
(because
it looks exactly like having transferred 0 bytes so far in a transfer  
where the
total is for some reason not known), I am not keen on the idea of forcing  
it to
fire at all. Setting up your transfer bar and running two events on it in  
the
case where there is nothing transferred seems a bit odd to me.

> 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.

In practice it seems a bad idea to say too much about how often it should  
fire.
It is easy enough to come up with a use case where firing every two  
seconds is
fine (am I the only one who has used a 9600baud GSM connection recently?),  
and I
can imagine one where someone really wants high-speed information since  
they are
using it to do somthing other than just present a spinning wheel to the  
user,
such as determining how to process according to the speed of transfer up  
to some
ludicrously fast rate, on some wonderful Gigabit pipe or something.

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

If you get all the data at once, then the Load event fires anyway. That  
was the
rationale for removing the start and end events that we had earlier - you  
don't
need them.

cheers

Chaals

-- 
Charles McCathieNevile, Opera Software: Standards Group
hablo español - je parle français - jeg lærer norsk
chaals@opera.com Try Opera 9.1 http://opera.com
Received on Saturday, 27 January 2007 15:25:57 GMT

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