slightly faster and thread safer inference

This commit is contained in:
Miroslav Stampar
2011-01-16 10:52:42 +00:00
parent fb166e9445
commit 71391874eb
7 changed files with 27 additions and 35 deletions

View File

@@ -2080,10 +2080,11 @@ def getComparePageRatio(firstPage, secondPage, filtered=False):
if filtered:
(firstPage, secondPage) = map(getFilteredPageContent, (firstPage, secondPage))
conf.seqMatcher.set_seq1(firstPage)
conf.seqMatcher.set_seq2(secondPage)
seqMatcher = getCurrentThreadData().seqMatcher
seqMatcher.set_seq1(firstPage)
seqMatcher.set_seq2(secondPage)
return conf.seqMatcher.quick_ratio()
return seqMatcher.quick_ratio()
def openFile(filename, mode='r'):
"""