Rev 3373: (jam) Fix a performance regression in knit=>knit fetching. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Apr 17 16:54:13 BST 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3373
revision-id:pqm at pqm.ubuntu.com-20080417155359-m3nxwwr442bgmsne
parent: pqm at pqm.ubuntu.com-20080417100712-7pdn4q0fg9eoy3a2
parent: john at arbash-meinel.com-20080416145933-9gckdbje0wbjpd6p
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2008-04-17 16:53:59 +0100
message:
(jam) Fix a performance regression in knit=>knit fetching.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
------------------------------------------------------------
revno: 3369.2.2
revision-id:john at arbash-meinel.com-20080416145933-9gckdbje0wbjpd6p
parent: john at arbash-meinel.com-20080416145419-n2o7pkchnet77smi
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: knit_fetch_regression
timestamp: Wed 2008-04-16 09:59:33 -0500
message:
Update NEWS to reflect the regression fix.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
------------------------------------------------------------
revno: 3369.2.1
revision-id:john at arbash-meinel.com-20080416145419-n2o7pkchnet77smi
parent: pqm at pqm.ubuntu.com-20080416060444-1mgq4chv82tgm2sc
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: knit_fetch_regression
timestamp: Wed 2008-04-16 09:54:19 -0500
message:
Knit => knit fetching also has some very bad 'for x in revision_ids: has_revision_id()' calls
modified:
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
=== modified file 'NEWS'
--- a/NEWS 2008-04-17 05:49:53 +0000
+++ b/NEWS 2008-04-17 15:53:59 +0000
@@ -27,8 +27,11 @@
update. (John Arbash Meinel, #213771)
* Severe performance degradation in fetching from knit repositories to
- packs due to parsing the entire revisions.kndx on every graph walk
- iteration fixed by using the Repository.get_graph API. (Robert Collins)
+ knits and packs due to parsing the entire revisions.kndx on every graph
+ walk iteration fixed by using the Repository.get_graph API. There was
+ another regression in knit => knit fetching which re-read the index for
+ every revision each side had in common.
+ (Robert Collins, John Arbash Meinel)
DOCUMENTATION:
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2008-04-14 22:39:51 +0000
+++ b/bzrlib/repository.py 2008-04-16 14:54:19 +0000
@@ -592,10 +592,10 @@
Returns a set of the present revisions.
"""
result = []
- for id in revision_ids:
- if self.has_revision(id):
- result.append(id)
- return result
+ graph = self.get_graph()
+ parent_map = graph.get_parent_map(revision_ids)
+ # The old API returned a list, should this actually be a set?
+ return parent_map.keys()
@staticmethod
def create(a_bzrdir):
More information about the bazaar-commits
mailing list