Commit cc011c54 authored by AP matsuo koji's avatar AP matsuo koji 😲

CSRender v1.3.0.5 /Para (並行処理数の追加)

parent 4e87a0e5
......@@ -80,7 +80,7 @@
<Reference Include="System.Xml" />
<Reference Include="Windows, Version=255.255.255.255, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Annotated\Windows.winmd</HintPath>
<HintPath>C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Annotated\Windows.winmd</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="WindowsBase" />
......
......@@ -42,6 +42,8 @@ namespace CSRenderMain {
public string outuptImageDir = ""; // /O
[DataMember]
public string dpi = "72.0"; // /D
[DataMember]
public int para = 4; // 並行数
[DataMember]
public string boxSelect = "Crop"; // /B<x>
[DataMember]
......@@ -130,6 +132,7 @@ namespace CSRenderMain {
+ $"[ELSE ] その他のオプション\n"
+ $"\t/PDFium <0|1>:PDFiumライブラリを使う,デフォルト=1\n"
+ $"\t/NoExeSepa :実行分離しない(遅い)\n"
+ $"\t/para <並行数>:並行数を指定(デフォルト4)\n"
+ $"\t内部コマンド:/SubExe <WCF_PipeAddress> :実行分離,PDF単位で別Processで処理\n"
+ $"\n"
+ $"/H or /? : This help\n"
......@@ -238,6 +241,13 @@ namespace CSRenderMain {
DispHelp();
return -1;
}
} else if (isOpt("/Para")) {
string paraNum = (qu.Count > 0) ? qu.Dequeue() : "";// next word.
if (!int.TryParse(paraNum, out pm.para)) {
Console.WriteLine($"並行数が不正です:/para {paraNum}");
DispHelp();
return -1;
}
} else if (isOpt("/P")) {
pm.pageRange = (qu.Count > 0) ? qu.Dequeue() : "";// next word.
} else if (isOpt("/JPG", "/JPEG")) {
......@@ -529,7 +539,7 @@ namespace CSRenderMain {
//逆に遅くなる UWPコール(render)は対応していない?
if (pm.bExeSepa &&(!pm.bFC)) { // FCモードは除外します。
var tokenSource = new CancellationTokenSource();
ParallelOptions options = new ParallelOptions { MaxDegreeOfParallelism = 4 };
ParallelOptions options = new ParallelOptions { MaxDegreeOfParallelism = pm.para };
ret = 0;//Success
var loopResult = Parallel.For(0,pdfPathLstBoth.Count, options, (index,lpState) => {
//for (var index = 0; index < pdfPathLstBoth.Count; index++) {
......
......@@ -32,9 +32,10 @@ using System.Runtime.InteropServices;
// すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.0.4")]
[assembly: AssemblyFileVersion("1.3.0.4")]
[assembly: AssemblyVersion("1.3.0.5")]
[assembly: AssemblyFileVersion("1.3.0.5")]
// rev:1.3.0.5:2021/09/14 :/Paraで並行プロセス最大値の設定追加
// rev:1.3.0.4:2021/04/29 :Helpの記述抜け "/Result"の対応
// rev:1.3.0.3:2020/11/22 :/Result <比較結果> を実装。diff画像を出力
// rev:1.3.0.2: streamのフラッシュミス 比較時に差異があるとクラッシュしていた。
rev:1.3.0.5:2021/09/14 :/Paraで並行プロセス最大値の設定追加
rev:1.3.0.4:2021/04/29 :Helpの記述抜け "/Result"の対応
V1.3.0.3:2020/11/22 :/Result <比較結果> を実装。diff画像を出力
V1.3.0.3:2020/11/22 :/Result <比較結果> を実装。diff画像を出力
V1.3.0.2:2020/07/11 :不具合修正
比較時に差異があるとクラッシュしていた。streamのフラッシュミス
V1.3.0.1:2020/06/20 :不具合修正
2つのファイルの比較が常にOKになっていた可能性があるので修正
......@@ -57,6 +62,7 @@ CSRender.exe [/<Opts>] <PDFPath or PDFDir>
[ELSE ] その他のオプション
/PDFium <0|1>:PDFiumライブラリを使う,デフォルト=1
/NoExeSepa :実行分離しない(遅い)
/para <並行数>:並行数を指定(デフォルト4)
内部コマンド:/SubExe <WCF_PipeAddress> :実行分離,PDF単位で別Processで処理
/H or /? : This help
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment