Rev 3713: Reduce lookups in process_entry. in http://people.ubuntu.com/~robertc/baz2.0/readdir
Robert Collins
robertc at robertcollins.net
Mon Sep 15 04:44:16 BST 2008
At http://people.ubuntu.com/~robertc/baz2.0/readdir
------------------------------------------------------------
revno: 3713
revision-id: robertc at robertcollins.net-20080915034410-9dd00jj32fumwlyx
parent: robertc at robertcollins.net-20080915032353-s0i0zt6b4rob77vp
committer: Robert Collins <robertc at robertcollins.net>
branch nick: process-entry-optimised
timestamp: Mon 2008-09-15 13:44:10 +1000
message:
Reduce lookups in process_entry.
modified:
bzrlib/_dirstate_helpers_c.pyx dirstate_helpers.pyx-20070503201057-u425eni465q4idwn-3
=== modified file 'bzrlib/_dirstate_helpers_c.pyx'
--- a/bzrlib/_dirstate_helpers_c.pyx 2008-09-15 03:23:53 +0000
+++ b/bzrlib/_dirstate_helpers_c.pyx 2008-09-15 03:44:10 +0000
@@ -974,19 +974,21 @@
cdef char source_minikind
cdef object file_id
cdef int content_change
+ cdef object details_list
file_id = None
+ details_list = entry[1]
if source_index is None:
source_details = DirState.NULL_PARENT_DETAILS
else:
- source_details = entry[1][source_index]
- target_details = entry[1][target_index]
+ source_details = details_list[source_index]
+ target_details = details_list[target_index]
target_minikind = _minikind_from_string(target_details[0])
if path_info is not None and _versioned_minikind(target_minikind):
if target_index != 0:
raise AssertionError("Unsupported target index %d" % target_index)
link_or_sha1 = _update_entry(state, entry, path_info[4], path_info[3])
# The entry may have been modified by update_entry
- target_details = entry[1][target_index]
+ target_details = details_list[target_index]
target_minikind = _minikind_from_string(target_details[0])
else:
link_or_sha1 = None
More information about the bazaar-commits
mailing list