cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Download Averaging Issue

From: Rob Ward <rob_at_rob-ward.co.uk>
Date: Wed, 23 Nov 2011 11:07:58 +0000

On 22 November 2011 23:07, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Sun, 20 Nov 2011, Rob Ward wrote:
>
> With regards to resetting a timer/data the only way I can see of doing
>> this without effecting the current behaviour of curl is to add a reset
>> option that would store the current downloaded amount and download time
>> that can be used as an offset within the calculations for the current
>> average.
>>
>
> If we want to keep the current behavior exactly, then we can of course not
> modify it at all but would require a new option.
>
> Another way than introducing such offsets you mention could be to simply
> add a new internal speed counter that would be used for this and that can
> be reset without it affecting everything else. Or we just reset the 5
> second average counter to the set value and live with the possible
> side-effects.
>
> Right now I'm a bit torn about what the best possible approach would be...
>
>
> The other solution that appears relatively simple and as far as I can see
>> would have little impact on any other code is to have another option that
>> specifies a minimum desired download rate, then where the average speed is
>> used to decide if a delay should be inserted before downloading more data
>> this can be checked, and if the current rate is below it will continue
>> without delay irrespective of the average speed calculations.
>>
>
> Right. It has the upside that it doesn't change any old behavior, but it
> has the downside that it adds a new option and a new option that basically
> only makes sense exactly for the very limited use case when you set/lower
> the rate limit during a transfer.
>
>
> --
>
> / daniel.haxx.se
>

I would have thought that changing the behavior from what it has being for
several years could cause a number of issues for applications in the field
that have a dependency on it's current behavior, however i bow to your
judgment with regards to this as you obviously have a greater understanding
of how curl is used.

I would have also thought that curl will be used by many for streaming of
media and that having a minimum could service a large number of application
in the future but that is pure speculation.

Cheers,

Rob

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-11-23