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
1=== modified file 'bzrlib/knit.py'
2--- bzrlib/knit.py 2009-06-11 20:34:56 +0000
3+++ bzrlib/knit.py 2009-06-18 05:35:16 +0000
4@@ -2005,8 +2005,8 @@
5 missing_keys.remove(record.key)
6 yield record
7
8- self._raw_record_map = self.vf._get_record_map_unparsed(self.keys,
9- allow_missing=True)
10+ if self._raw_record_map is None:
11+ raise AssertionError('_raw_record_map should have been filled')
12 first = True
13 for key in self.keys:
14 if key in self.nonlocal_keys:
15
16=== modified file 'bzrlib/tests/blackbox/test_branch.py'
17--- bzrlib/tests/blackbox/test_branch.py 2009-06-10 03:56:49 +0000
18+++ bzrlib/tests/blackbox/test_branch.py 2009-06-18 05:35:16 +0000
19@@ -273,7 +273,7 @@
20 # being too low. If rpc_count increases, more network roundtrips have
21 # become necessary for this use case. Please do not adjust this number
22 # upwards without agreement from bzr's network support maintainers.
23- self.assertLength(39, self.hpss_calls)
24+ self.assertLength(38, self.hpss_calls)
25
26 def test_branch_from_trivial_branch_streaming_acceptance(self):
27 self.setup_smart_server_with_call_log()