Download progress

Martin Pool mbp at sourcefrog.net
Tue Apr 11 03:03:02 BST 2006


On 11/04/2006, at 2:45 AM, Aaron Bentley wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Okay, here's what I've got for download progress:
>
> 1. For transports which do most of their work in f.readlines(), we use
> progress_readlines() to do the readlines operation
> 2. For transports which do most of their work in _get(), we do a
> standard readlines().
> 3. For PYCURL, we supply a progress callback.  Other transports  
> that do
> all their work in _get() will need something similar done.
>
Looks good.

> Unfortunately, PYCURL appears to mess with the system clock, causing
> throttle to improperly throttle everything.  So now ChildProgress
> objects can demand not to be throttled.  Seems like a hack; don't know
> another option.  This should be avoided where possible.

Really?  It seems unlikely to me that it can interfere with the  
system clock or even with Python's ability to read it.

> I didn't make throttling a global setting, because it's only  
> required in
> certain contexts.  I didn't move throttling into ChildProgress,  
> because
> children can be created and destroyed rapidly, preventing throttling
> from taking effect.

Perhaps rather than disabling throttling we should have a method or  
parameter which says "this is an important message"?

Is it necessary to have no_throttle be a property of the  
ChildProgress, rather than just a method parameter?

I had also been thinking that we should split the progress bars into  
more of a model/view setup, where the models are stack but there's  
only a single view that's responsible for drawing all of them.

-- 
Martin







More information about the bazaar mailing list