'bzr branch --stacked' makes empty repo then builds a working tree with inefficient fetching

Bug #791704 reported by Andrew Bennetts
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
In Progress
High
John A Meinel

Bug Description

When doing a 'bzr branch --stacked' from a smart server that builds a working tree (the default scenario, i.e. --no-tree is not used, and not in a shared repo with working trees disabled), then it creates an empty repository and then starts the build-tree logic. This slowly walks the inventory and fetches texts individually, and doesn't cache any of that data in the local repo when done.

It would take far fewer network roundtrips (especially HPSS VFS ones), and greatly reduce bytes transferred, to instead ask the remote server to stream just the revision+inventory+texts (and associated signatures and chk_bytes) necessary to construct the tree for the one revision.

I have a rough branch that does this by:
 * define a new fetch spec for that
 * in BzrDir.sprout if we have a new stacked repository and are building a working tree, use that fetch spec
 * extend the StreamSource to understand that fetch spec.

This also has the benefit that the data that is being fetched anyway is saved in the local repo to benefit future operations (as well as fetching that data much much more effiiciently).

Related branches

Revision history for this message
Andrew Bennetts (spiv) wrote :

(This may help bug 444293 too)

Andrew Bennetts (spiv)
Changed in bzr:
status: Confirmed → In Progress
Revision history for this message
John A Meinel (jameinel) wrote :

I'm planning on picking up Andrew's work, since I'm guessing he won't have tons of spare time now. Mostly moving it into my queue so I don't forget about it.

Changed in bzr:
assignee: Andrew Bennetts (spiv) → John A Meinel (jameinel)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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