Merge lp:~ian-clatworthy/bzr/faster-branch-in-shared-repo into lp:~bzr/bzr/trunk-old

Proposed by Ian Clatworthy on 2009-05-22
Status: Merged
Merged at revision: not available
Proposed branch: lp:~ian-clatworthy/bzr/faster-branch-in-shared-repo
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: 32 lines
To merge this branch: bzr merge lp:~ian-clatworthy/bzr/faster-branch-in-shared-repo
Reviewer Review Type Date Requested Status
Robert Collins (community) 2009-05-22 Approve on 2009-05-22
Review via email: mp+6737@code.launchpad.net
To post a comment you must log in.
Ian Clatworthy (ian-clatworthy) wrote :

This small patch speeds up branch in a shared repo for development6-rich-root format. For OOo, the time drops from 265 seconds to 95 seconds.

Robert Collins (lifeless) wrote :

 review approve
it would be nice, if possible, to test this.

-Rob

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2009-05-22 01:44:19 +0000
3+++ NEWS 2009-05-22 05:35:15 +0000
4@@ -18,6 +18,9 @@
5 Improvements
6 ************
7
8+* ``bzr branch`` in a shared repository is now faster for
9+ development6-rich-root format. (Ian Clatworthy)
10+
11 * ``bzr branch --notree`` is now faster. (Ian Clatworthy)
12
13 Bug Fixes
14
15=== modified file 'bzrlib/workingtree_4.py'
16--- bzrlib/workingtree_4.py 2009-05-05 05:39:41 +0000
17+++ bzrlib/workingtree_4.py 2009-05-22 05:35:15 +0000
18@@ -1434,6 +1434,14 @@
19 if basis_root_id is not None:
20 wt._set_root_id(basis_root_id)
21 wt.flush()
22+ # If content filtering is supported, do not use the accelerator
23+ # tree - the cost of transforming the content both ways and
24+ # checking for changed content can outweight the gains it gives.
25+ # Note: do NOT move this logic up higher - using the basis from
26+ # the accelerator tree is still desirable because that can save
27+ # a minute or more of processing on large trees!
28+ if wt.supports_content_filtering():
29+ accelerator_tree = None
30 # delta_from_tree is safe even for DirStateRevisionTrees,
31 # because wt4.apply_inventory_delta does not mutate the input
32 # inventory entries.