async improvement

This commit is contained in:
Boki 2026-02-15 18:39:55 -05:00
parent 3fe7c0b37d
commit 9de6293b1a
4 changed files with 101 additions and 34 deletions

View file

@ -67,7 +67,7 @@ public class WorldMap : IDisposable
var changedPixels = Cv2.CountNonZero(xor);
if (changedPixels < _config.FrameChangeThreshold)
{
Log.Information("Frame dedup: {Changed} changed pixels, skipping ({Ms:F1}ms)",
Log.Debug("Frame dedup: {Changed} changed pixels, skipping ({Ms:F1}ms)",
changedPixels, sw.Elapsed.TotalMilliseconds);
return _position;
}
@ -122,7 +122,7 @@ public class WorldMap : IDisposable
var posDx = _position.X - prevPos.X;
var posDy = _position.Y - prevPos.Y;
Log.Information("MatchAndStitch: mode={Mode} pos=({X:F1},{Y:F1}) moved=({Dx:F1},{Dy:F1}) dedup={Dedup:F1}ms match={Match:F1}ms stitch={Stitch:F1}ms total={Total:F1}ms",
Log.Debug("MatchAndStitch: mode={Mode} pos=({X:F1},{Y:F1}) moved=({Dx:F1},{Dy:F1}) dedup={Dedup:F1}ms match={Match:F1}ms stitch={Stitch:F1}ms total={Total:F1}ms",
mode, _position.X, _position.Y, posDx, posDy, dedupMs, matchMs, stitchMs, sw.Elapsed.TotalMilliseconds);
return _position;
}