PeopleModel: various performance tweaks
svn: r12711
This commit is contained in:
parent
4cd2468477
commit
3a41651e50
@ -140,12 +140,13 @@ class NodeTreeMap(object):
|
|||||||
return node in self.sname_sub
|
return node in self.sname_sub
|
||||||
|
|
||||||
def find_next_node(self, node):
|
def find_next_node(self, node):
|
||||||
try:
|
if node in self.top_iter2path:
|
||||||
path = self.top_iter2path[node]
|
path = self.top_iter2path[node]
|
||||||
if path+1 == len(self.top_path2iter):
|
if path+1 < len(self.top_path2iter):
|
||||||
|
return self.top_path2iter[path+1]
|
||||||
|
else:
|
||||||
return None
|
return None
|
||||||
return self.top_path2iter[path+1]
|
else:
|
||||||
except:
|
|
||||||
(surname, val) = self.iter2path[node]
|
(surname, val) = self.iter2path[node]
|
||||||
return self.path2iter.get((surname, val+1))
|
return self.path2iter.get((surname, val+1))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user