push when nothing changed

John Arbash Meinel john at arbash-meinel.com
Tue Dec 5 16:45:52 GMT 2006


Alexander Belchenko wrote:
> Alexander Belchenko ?8H5B:
>>> I do successful push over sftp.
>>> Then I push second time (branch not changed!).
>>> bzr read about 1Mbyte data over sftp to detect that nothing need to push.
>>> Is it intended behaviour?
>>>
>>> For me it's very unpleased because it takes several minutes over my
>>> not-so-fast connection.
>>>
>>> IIUC, bzr pull read from remote location only branch-history to detect
>>> that nothing changed. What push do? And why?
> 
> Attached log for this push operation, but anyway I don't understand why
> it takes so long.
> 
> Alexander

Looking at the log, it seems to only be doing 1 step that I might
consider unnecessary, and that is opening "revisions.kndx".

On my machine I have about 11K revisions in revisions.kndx and it is
about 887K. Though if you haven't re-packed the indexes since we fixed
it, then it could indeed be even larger.

The push code allows you to push if the target revision is in your
ancestry, it doesn't have to be on your mainline. Which means it reads
the remote ancestry.

However, we certainly could do 2 levels of optimizations.

1) "if remote.last_revision() == local.last_revision()" => nothing to do

   That should help in your case. It still has to download all of the
revision-history, but if/when we switch to only recording the
last-revision rather than the complete history, that could be a very
small download and check.

2) "if remote.last_revision() in local.revision_history()". Actually,
all we need to do is "if remote.last_revision() in local.ancestry()"

It may be that the fetch() code isn't paying attention to push versus
pull, and is assuming that one side is local, and it is cheap to get the
information for that side.

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/20061205/a6da2089/attachment.pgp 


More information about the bazaar mailing list