added log into Alphabet service since it can induce a large perf hit

This commit is contained in:
AT
2019-11-16 01:28:07 +02:00
parent dcb9e34d59
commit 9d98d26cc7
2 changed files with 6 additions and 6 deletions

View File

@@ -117,6 +117,12 @@ namespace Wox.Infrastructure
return false;
}
if (word.Length > 40)
{
Log.Debug($"|Wox.Infrastructure.StringMatcher.ScoreForPinyin|skip too long string: {word}");
return false;
}
var chinese = word.Select(PinyinHelper.toHanyuPinyinStringArray)
.Any(p => p != null);
return chinese;