~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/groupcompress_repo.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-05 10:34:00 UTC
  • mfrom: (5829.1.1 gc-stream-caching)
  • Revision ID: pqm@pqm.ubuntu.com-20110505103400-nlp1e2u04ny0isao
(spiv) Slightly reduce memory use while fetching to/from 2a repositories.
 (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1261
1261
            yield (stream_info[0],
1262
1262
                wrap_and_count(pb, rc, stream_info[1]))
1263
1263
        self._revision_keys = [(rev_id,) for rev_id in revision_ids]
1264
 
        self.from_repository.revisions.clear_cache()
1265
 
        self.from_repository.signatures.clear_cache()
1266
 
        s = self._get_inventory_stream(self._revision_keys)
1267
 
        yield (s[0], wrap_and_count(pb, rc, s[1]))
1268
 
        self.from_repository.inventories.clear_cache()
1269
1264
        # TODO: The keys to exclude might be part of the search recipe
1270
1265
        # For now, exclude all parents that are at the edge of ancestry, for
1271
1266
        # which we have inventories
1272
1267
        from_repo = self.from_repository
1273
1268
        parent_keys = from_repo._find_parent_keys_of_revisions(
1274
1269
                        self._revision_keys)
 
1270
        self.from_repository.revisions.clear_cache()
 
1271
        self.from_repository.signatures.clear_cache()
 
1272
        s = self._get_inventory_stream(self._revision_keys)
 
1273
        yield (s[0], wrap_and_count(pb, rc, s[1]))
 
1274
        self.from_repository.inventories.clear_cache()
1275
1275
        for stream_info in self._get_filtered_chk_streams(parent_keys):
1276
1276
            yield (stream_info[0], wrap_and_count(pb, rc, stream_info[1]))
1277
1277
        self.from_repository.chk_bytes.clear_cache()