bzr branches is comically slow on a remote repository

Bug #902566 reported by Glyph Lefkowitz
This bug report is a duplicate of:  Bug #197597: branches command slow. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
BzrTools
New
Undecided
Unassigned

Bug Description

This is just ridiculous:

glyph@vetinari:~/Projects/Twisted/mirror$ time bzr branches bzr+ssh://svn.twistedmatrix.com/var/www/bzr/Twisted > branchlist
  2063kB 2kB/s /
real 12m16.855s
user 0m11.781s
sys 0m0.496s
glyph@vetinari:~/Projects/Twisted/mirror$ time ssh svn.twistedmatrix.com bzr branches /var/www/bzr/Twisted > branchlist.2

real 0m5.898s
user 0m0.012s
sys 0m0.012s
glyph@vetinari:~/Projects/Twisted/mirror$ diff branchlist branchlist.2
glyph@vetinari:~/Projects/Twisted/mirror$ wc -l branchlist
278 branchlist

What on earth is it doing?

Revision history for this message
Aaron Bentley (abentley) wrote :

It is looking for branches by doing low-level operations such listing directories and opening files, because Bazaar's BzrDir.find_branches method isn't optimized for remote operations.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

BzrDir.find_branches should be deprecated because it is used as a classmethod method that can't be overriden.

the "bzr branches" command in bzr 2.5 uses the "BzrDir.list_branches" method, which /can/ be overridden (and bzr-svn does so).

tags: added: hpss
Jelmer Vernooij (jelmer)
Changed in bzr:
status: New → Triaged
importance: Undecided → Medium
status: Triaged → Confirmed
tags: added: hpss-no-vfs
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.