push when nothing changed

John Arbash Meinel john at arbash-meinel.com
Tue Dec 5 20:18:00 GMT 2006


Alexander Belchenko wrote:
> John Arbash Meinel ?8H5B:
>>> 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.
> 
> bzr.dev has revision history file is about 120Kbytes. It's smaller than
> 1Mbytes.
>

There are 2 files it is downloading

bzr.dev/.bzr/branch/revision-history
which is about 120KB

and
bzr.dev/.bzr/repository/revisions.kndx
Which is about 1MB

The plan I outlined here allows that first download to be only 120KB
instead of 1MB. And more importantly allows us in the future to change
the format to only download a few hundred bytes, rather than 100KB.

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/039e5504/attachment.pgp 


More information about the bazaar mailing list