'bzr update' has a lot of round trips when there is nothing to do

John Arbash Meinel john at arbash-meinel.com
Mon Jul 21 22:04:36 BST 2008


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

http://bazaar-vcs.org/Analysis/HttpUpdate1.6

I just noticed that running 'bzr up' in my bzr.dev mirror was taking >3s
to find out that there was nothing to actually update.

It seems that my ping time to bazaar-vcs.org is about 200ms, which is a
bit high (normally I think it is closer to 100ms).

But basically, all of that time is spent probing for the different
objects on the remote side. We have to find the bzr dir format
(.bzr/branch-format) then the branch format (.bzr/branch/format), and
then find the repository (.bzr/repository/format) except it isn't there,
so we have to open the containing directory's BzrDir, and re-probe.

I found that for some reason, we connect() twice. Our initial POST to
.bzr/smart gets a Keep-Alive response, but it is ignored. (A later POST
re-uses the connection, so something weird is happening here.)

It also seems that we aren't as efficient as we would like to be when
connecting over bzr+ssh. Basically, we still do all the probing, and
even though the "BzrDir.find_repositoryV2" actually returns the location
of the other repository, we still end up moving our pointer locally and
issuing another couple requests (probing for both the BzrDir and the
Repository).

I would be really interested to see us add an RPC call (certainly not
until 1.7) that would return enough information to instantiate a Branch
with its last revision info, and a repository with the basic
information, all in 1 round trip.
The total number of bytes on the wire is going to be trivial. Even if we
had to return all of the 'format' file contents. I figure probably less
than 1K of data.

I'm not 100% sure what meta-data should be in the request, but it is
quite rare that we want to open a Branch without wanting to know its tip
revision (eventually).

Thoughts?

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiE+eQACgkQJdeBCYSNAAM+LQCfdjlogLI5H9RXvKRwdAOaZlh1
Q2QAniAzDOR1oyVSYCQok3K3py42AGQx
=AsiL
-----END PGP SIGNATURE-----



More information about the bazaar mailing list