[RFC] Clean up progress bars during fetch

John Arbash Meinel john at arbash-meinel.com
Wed Nov 8 23:20:32 GMT 2006


Wouter van Heyst wrote:
> On Sat, Nov 04, 2006 at 11:57:06AM -0600, John Arbash Meinel wrote:
> 
> ...
> 
>> TODO:
>>   The biggest thing that needs to be done at this point is to change the
>>   HTTP.readv() implementation. Right now it doesn a big download, then
>>   breaks up the file and yields the data. What we really need is for it
>>   to yield the data as it is read. sftp and local transports do this,
>>   and it means that we can get a meaningful progress while we are
>>   downloading inventory.knit to find what file ids are involved. If you
>>   want to see the difference use a machine that you have access over
>>   sftp and http, and you can see how the phase 1/6 over sftp has a nice
>>   updating progress, and over http it just hangs while it downloads all
>>   the data.
> 
> While I'd agree with yielding it earlier on, I can't see a difference
> between sftp and http progress output at the moment?

It is only during the "Finding involved ids" phase, which is when we are
downloading the inventory.knit contents. This is the only large copy, so
it is the only one that is really effected by being able to return
before the whole thing has been downloaded.

> 
>> It would be really nice to have people play with this, and let me know
>> if they think it is better than what we used to do. If people like it,
>> then I'll spend the time to fix up any broken tests, and get it merged.
>> (*I* like it, so I will probably do it anyway, but feedback always helps)
> 
> I think it's an improvement, though it could still be more finegrained.

What would you like to see? I've thought about adding a XX/XXXX entry,
to include the fraction that the child claims it has finished. That
would also help feel like something is actually getting done.

> 
>> # Bazaar revision bundle v0.8
>> #
>> # message:
>> #   Fix bug in Knit.iter_lines_added_or_present_in_versions which was re-using a variable
>> # committer: John Arbash Meinel <john at arbash-meinel.com>
>> # date: Sat 2006-11-04 11:43:27.471999884 -0600
> 
> I like the result, but not really knowing how progress bars work, I must
> confess not being sure what the changes were. Everything seems to move
> up a level?
> 
> Wouter van Heyst

Actually, things just get moved around. :)

ProgressPhase changes so that it can take a message, which means you
don't see "Fetch phase X/6" all the time, instead you see what is going on.

It splits up the first phase into the actual expensive download of
inventory.knit, separate from the cheaper downloads of all of the
individual file knits.

It fixes a bug where displaying the join() progress of a knit would
always stay near the 0/8000 mark (because it was re-using a variable in
a bad way).

That's about it. If anything, it moves everything *down* a level. So
that the function being called is updating the ProgressPhase, rather
than the one *calling* the function.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061108/0cbea28e/attachment.pgp 


More information about the bazaar mailing list