Autopack over dumb transports causes excess use of bandwidth.

Eric Siegerman lists08-bzr at davor.org
Thu Sep 10 14:03:27 BST 2009


On Wed, 2009-09-09 at 09:43 -0500, John Arbash Meinel wrote:
> number-of-keys is cheap to determine (it is in the header of every
btree
> index), but bytes-in-the-pack is not. We only have that information by
> reading all of the indexes for a given pack file and finding the
largest
> reference. (a is at 100, b is at 200, c is at 300, pack must be >300
bytes.)

Perhaps it would suffice to just stat() the pack file.  Sure,
that might count some overhead that walking the data structures
would exclude, but for the current purpose, it might be a close
enough approximation.


>   bzr init
>   bzr commit
>   for i in `seq 100`; do bzr commit --unchanged; done
>   bzr pack
>   bzr push
>   bzr uncommit -r 1
>   bzr push --overwrite

Would it also work to create a temporary junk branch?  That is,
on the machine hosting the repo, do:
    cd $repo
    bzr init junk
    bzr co junk  # if it's a no-trees repo
    # commit 100 revs to branch "junk" as shown above
    bzr pack
    rm -r junk

Further, could one do this from the remote machine -- perhaps
by including a suitable "bzr push"?

(These questions are not rhetorical; I'm trying to understand
whether these things would in fact work...)

  - Eric





More information about the bazaar mailing list