[Yum-devel] External downloader

Zdenek Pavlas zpavlas at redhat.com
Tue Nov 22 09:47:32 UTC 2011


> 1. Update, got 1 byte.
> 2. Update, got 6666 bytes.
> 3. Network glitch for N seconds.

> ...here if you happen to "skip" sending the second update then you
> can be giving very false information to the user for N seconds of time.

BaseMeter.update() would skip the second update anyway, IMO.
Curl (just checked with libcurl/7.21.0) calls progress callback
every two seconds or so even when stalled.

>  Obviously it's not going to happen a lot, but I'd rather just not
>  have to worry about it.

We don't call progress updates from the stream writer but from
curl's progress callback, and curl (at least the current version of)
keeps calling that even when download stalls.  Just checked with
both Curl() and CurlMulti().

>  Well we tie the progress update directly to curl atm. ... so are we
> doing 100s of updates now? Does it matter now? Does it start to
> matter if they go over a pipe?

We drop most of updates in BaseMeter.update() or MultiFileMeter.update_meter().
Does not matter when running in a single process but process ping-pong
on each frame received should definitely be avoided, so I want to
drop updates that are not of any use before they go through the pipe.


More information about the Yum-devel mailing list