Refactoring pinyin

1. use custom patched pinyin library Pinyin4Net
2. fix memory leak on startup: 360mb -> 160mb when using vs15 debugger
This commit is contained in:
bao-qian
2016-04-24 00:37:25 +01:00
parent 952b5fab89
commit b600bce23f
16 changed files with 198 additions and 691 deletions

View File

@@ -48,8 +48,8 @@
<HintPath>..\packages\NLog.4.2.0\lib\net45\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Pinyin4Net, Version=2015.11.9.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Pinyin4DotNet.2015.11.9\lib\net452\Pinyin4Net.dll</HintPath>
<Reference Include="Pinyin4Net, Version=2016.4.24.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Pinyin4DotNet.2016.4.23.4\lib\net452\Pinyin4Net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@@ -78,13 +78,12 @@
<Compile Include="Storage\BinaryStorage.cs" />
<Compile Include="Storage\JsonStorage.cs" />
<Compile Include="StringMatcher.cs" />
<Compile Include="Unidecoder.Characters.cs" />
<Compile Include="Http\HttpRequest.cs" />
<Compile Include="FuzzyMatcher.cs" />
<Compile Include="Hotkey\GlobalHotkey.cs" />
<Compile Include="Hotkey\HotkeyModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Unidecoder.cs" />
<Compile Include="Alphabet.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Wox.Plugin\Wox.Plugin.csproj">
@@ -104,6 +103,10 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>cd $(SolutionDir)packages\Pinyin4DotNet*\pinyindb\
xcopy /Y unicode_to_hanyu_pinyin.txt $(TargetDir)pinyindb\</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">