Merge lp:~jameinel/bzr/1.17-extract-one-time into lp:~bzr/bzr/trunk-old

Proposed by John A Meinel
Status: Merged
Approved by: Ian Clatworthy
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~jameinel/bzr/1.17-extract-one-time
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: 27 lines
To merge this branch: bzr merge lp:~jameinel/bzr/1.17-extract-one-time
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+7587@code.launchpad.net
To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

While investigating 'annotate' performance, I was surprised to find that _simple_annotate was 4x slower than the optimized path (even with the KnownGraph improvements). (90ms versus 370ms)

It turns out that at least one problem was that doing "get_record_stream(..., True)" was causing the _ContentMapGenerator to read the raw records 2 times. One time in __init__, and then a second time in _work.

This patch just removes the second call. Which makes _simple_annotate 265ms (3:1). This would effect any time we have code that tries to get fulltexts. So it should also impact things like building the working tree, etc.

Revision history for this message
Robert Collins (lifeless) wrote :

 review +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzrlib/knit.py'
--- bzrlib/knit.py 2009-06-11 20:34:56 +0000
+++ bzrlib/knit.py 2009-06-18 05:35:16 +0000
@@ -2005,8 +2005,8 @@
2005 missing_keys.remove(record.key)2005 missing_keys.remove(record.key)
2006 yield record2006 yield record
20072007
2008 self._raw_record_map = self.vf._get_record_map_unparsed(self.keys,2008 if self._raw_record_map is None:
2009 allow_missing=True)2009 raise AssertionError('_raw_record_map should have been filled')
2010 first = True2010 first = True
2011 for key in self.keys:2011 for key in self.keys:
2012 if key in self.nonlocal_keys:2012 if key in self.nonlocal_keys:
20132013
=== modified file 'bzrlib/tests/blackbox/test_branch.py'
--- bzrlib/tests/blackbox/test_branch.py 2009-06-10 03:56:49 +0000
+++ bzrlib/tests/blackbox/test_branch.py 2009-06-18 05:35:16 +0000
@@ -273,7 +273,7 @@
273 # being too low. If rpc_count increases, more network roundtrips have273 # being too low. If rpc_count increases, more network roundtrips have
274 # become necessary for this use case. Please do not adjust this number274 # become necessary for this use case. Please do not adjust this number
275 # upwards without agreement from bzr's network support maintainers.275 # upwards without agreement from bzr's network support maintainers.
276 self.assertLength(39, self.hpss_calls)276 self.assertLength(38, self.hpss_calls)
277277
278 def test_branch_from_trivial_branch_streaming_acceptance(self):278 def test_branch_from_trivial_branch_streaming_acceptance(self):
279 self.setup_smart_server_with_call_log()279 self.setup_smart_server_with_call_log()