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:
@@ -344,6 +344,7 @@ WARN_MSGID_END_POINT_ALLOWED = {
|
|||||||
"Temp. Diff.",
|
"Temp. Diff.",
|
||||||
"Float Neg. Exp.",
|
"Float Neg. Exp.",
|
||||||
" RNA Path: bpy.types.",
|
" RNA Path: bpy.types.",
|
||||||
|
"Max Ext.",
|
||||||
}
|
}
|
||||||
|
|
||||||
PARSER_CACHE_HASH = 'sha1'
|
PARSER_CACHE_HASH = 'sha1'
|
||||||
|
|||||||
@@ -68,9 +68,7 @@ def get_best_similar(data):
|
|||||||
for x in similar_pool:
|
for x in similar_pool:
|
||||||
if min_len < len(x) < max_len:
|
if min_len < len(x) < max_len:
|
||||||
s.set_seq1(x)
|
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 and s.quick_ratio() >= use_similar:
|
|
||||||
if s.real_quick_ratio() >= use_similar:
|
|
||||||
sratio = s.ratio()
|
sratio = s.ratio()
|
||||||
if sratio >= use_similar:
|
if sratio >= use_similar:
|
||||||
tmp = x
|
tmp = x
|
||||||
|
|||||||
Reference in New Issue
Block a user