periodical commit

This commit is contained in:
Miroslav Stampar
2010-05-21 09:35:36 +00:00
parent 9c1d82c9f7
commit 68e13c3872
6 changed files with 113 additions and 7 deletions

View File

@@ -340,7 +340,14 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
while True:
index += 1
charStart = time.time()
val = getChar(index, asciiTbl)
if conf.useCommonPrediction:
commonTbl, otherTbl = getCommonPredictionTables(finalValue, asciiTbl)
val = getChar(index, commonTbl) if commonTbl else None
if not val:
val = getChar(index, otherTbl)
else:
val = getChar(index, asciiTbl)
if val is None or ( lastChar > 0 and index > lastChar ):
break