removed debug code and fixed some bugs

This commit is contained in:
2025-04-05 08:51:04 +05:00
parent f3106769d9
commit c4ab4028ae
3 changed files with 6 additions and 29 deletions
@@ -109,7 +109,7 @@ public partial class Program
}
finally
{
GC.Collect();
GC.Collect(GC.MaxGeneration, GCCollectionMode.Aggressive, false, true);
}
return await ReturnResponseJson(ctx, meta);
-15
View File
@@ -55,21 +55,6 @@ public static partial class Program
try
{
Stopwatch stopwatch = new();
using var save = File.OpenRead("data/gamestate");
stopwatch.Start();
var parser = new SaveParserEU4(save, SearchExpressionCompiler.Compile("saved_event_target"));
var result = parser.Parse();
stopwatch.Stop();
using (var resultFile = File.OpenWrite("data/parsed.json"))
{
JsonSerializer.Serialize(resultFile, result, _saveSerializerOptions);
}
Console.WriteLine($"get: {parser.SBPoolGetCount} return: {parser.SBPoolReturnCount} " +
$"delta: {parser.SBPoolGetCount - parser.SBPoolReturnCount}");
Console.WriteLine(stopwatch.Elapsed);
return;
// config
if (!File.Exists(_configPath))
{