mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
added log into Alphabet service since it can induce a large perf hit
This commit is contained in:
parent
dcb9e34d59
commit
9d98d26cc7
2 changed files with 6 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -131,12 +131,6 @@ namespace Wox.Infrastructure
|
|||
{
|
||||
if (!string.IsNullOrEmpty(source) && !string.IsNullOrEmpty(target))
|
||||
{
|
||||
if(source.Length > 40)
|
||||
{
|
||||
Log.Debug($"|Wox.Infrastructure.StringMatcher.ScoreForPinyin|skip too long string: {source}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (Alphabet.ContainsChinese(source))
|
||||
{
|
||||
var combination = Alphabet.PinyinComination(source);
|
||||
|
|
|
|||
Loading…
Reference in a new issue