Download progress

Aaron Bentley aaron.bentley at utoronto.ca
Tue Apr 11 07:06:36 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
| On 11/04/2006, at 2:45 AM, Aaron Bentley wrote:
|> 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.

It wasn't showing any progress.  I stuck a note in throttle to show
"now" and "self.last_update", and the numbers didn't change.  So all I
know is the effect, and that seems to be the only cause that can explain 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"?

I'm not sure that it *is* an important message.  What's special about
being called from PYCURL is that cURL does its own throttling, so it can
say "don't worry, I know what I'm doing".

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

No, it's not.  I was thinking of each ChildProcess as representing a
context, and needing throttling being a property of that context, but I
can certainly change it.

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

Sounds interesting.  The TTYProgressBar could certainly use some
refactoring, and my thought was to split the calculations from the
display, maybe dividing different elements into different functions.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEO0dr0F+nu1YWqI0RAq8kAJwJCX3CGVVpHN3BdhCbHR7TMZKrGwCeOo7T
gmC075Ne1gXC83t6AdtZHiU=
=Y8LO
-----END PGP SIGNATURE-----




More information about the bazaar mailing list