_time build cache

This commit is contained in:
2023-05-21 20:25:24 +03:00
parent 68c9ff92b9
commit af326f934c

View File

@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using Flax.Build.Graph;
@@ -269,7 +270,10 @@ namespace Flax.Build
using (new ProfileEventScope("LoadIncludesCache"))
{
var sw = Stopwatch.StartNew();
IncludesCache.LoadCache();
sw.Stop();
Log.Info($"LoadIncludesCache: {sw.Elapsed.TotalMilliseconds}ms");
}
// Create task graph for building all targets
@@ -392,7 +396,12 @@ namespace Flax.Build
graph.SortTasks();
using (new ProfileEventScope("LoadCache"))
{
var sw = Stopwatch.StartNew();
graph.LoadCache();
sw.Stop();
Log.Info($"LoadCache: {sw.Elapsed.TotalMilliseconds}ms");
}
}
// Execute tasks
@@ -407,13 +416,19 @@ namespace Flax.Build
// Save graph execution result cache
using (new ProfileEventScope("SaveCache"))
{
var sw = Stopwatch.StartNew();
graph.SaveCache();
sw.Stop();
Log.Info($"SaveCache: {sw.Elapsed.TotalMilliseconds}ms");
}
}
using (new ProfileEventScope("SaveIncludesCache"))
{
var sw = Stopwatch.StartNew();
IncludesCache.SaveCache();
sw.Stop();
Log.Info($"SaveIncludesCache: {sw.Elapsed.TotalMilliseconds}ms");
}
foreach (var target in targets)