~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/reconcile.py

  • Committer: John Arbash Meinel
  • Date: 2010-08-10 20:03:44 UTC
  • mto: This revision was merged to the branch mainline in revision 5376.
  • Revision ID: john@arbash-meinel.com-20100810200344-6muerwvkafqu7w47
Rework things a bit so the logic can be shared.

It turns out that some of the peak memory is actually during the inventory
to string to bundle translations. So re-use the refcount logic there.
This actually does show a decrease in peak memory.
Specifically 'cd bzr.dev; bzr send ../2.2' drops from 221MB peak to 156MB.

We don't speed anything up (16.5s both ways), but peak memory is quite
a bit better.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    cleanup,
31
31
    errors,
32
32
    ui,
33
 
    repository,
34
33
    )
35
34
from bzrlib.trace import mutter
36
35
from bzrlib.tsort import topo_sort
97
96
    def _reconcile_repository(self):
98
97
        self.repo = self.bzrdir.find_repository()
99
98
        ui.ui_factory.note('Reconciling repository %s' %
100
 
            self.repo.bzrdir.root_transport.base)
 
99
            self.repo.user_url)
101
100
        self.pb.update("Reconciling repository", 0, 1)
102
101
        repo_reconciler = self.repo.reconcile(thorough=True)
103
102
        self.inconsistent_parents = repo_reconciler.inconsistent_parents
495
494
    #  - lock the names list
496
495
    #  - perform a customised pack() that regenerates data as needed
497
496
    #  - unlock the names list
498
 
    # https://bugs.edge.launchpad.net/bzr/+bug/154173
 
497
    # https://bugs.launchpad.net/bzr/+bug/154173
499
498
 
500
499
    def _reconcile_steps(self):
501
500
        """Perform the steps to reconcile this repository."""