Restore usage of difflib's quick_ratio()... Don't actually know what happens here, my tests with timeit showed it much slower than ratio(), but real-life says the contrary...

This commit is contained in:
Bastien Montagne 2013-04-19 16:23:02 +00:00
parent 1210c8493c
commit fba67abf7a
2 changed files with 2 additions and 3 deletions

@ -344,6 +344,7 @@ WARN_MSGID_END_POINT_ALLOWED = {
"Temp. Diff.",
"Float Neg. Exp.",
" RNA Path: bpy.types.",
"Max Ext.",
}
PARSER_CACHE_HASH = 'sha1'

@ -68,9 +68,7 @@ def get_best_similar(data):
for x in similar_pool:
if min_len < len(x) < max_len:
s.set_seq1(x)
# XXX quick_ratio() actually looks much slower (~400%) than ratio() itself!!!
#if s.real_quick_ratio() >= use_similar and s.quick_ratio() >= use_similar:
if s.real_quick_ratio() >= use_similar:
if s.real_quick_ratio() >= use_similar and s.quick_ratio() >= use_similar:
sratio = s.ratio()
if sratio >= use_similar:
tmp = x