Add some basic timings

This commit is contained in:
Jarrod Doyle 2024-08-26 13:25:06 +01:00
parent 6e70ad22c1
commit e213b3ea26
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 5 additions and 4 deletions

View File

@ -100,10 +100,11 @@ public partial class Mission : Node3D
ClearMap(); ClearMap();
_textureLoader = new TextureLoader(_campaignName); _textureLoader = new TextureLoader(_campaignName);
_file = new(FileName); Timing.TimeStage("DbFile Parse", () => _file = new(FileName));
UseChunk<TxList>("TXLIST", LoadTextures); Timing.TimeStage("Load FAM", () => UseChunk<TxList>("TXLIST", LoadTextures));
UseChunk<WorldRep>("WREXT", BuildWrMeshes); Timing.TimeStage("Build WR", () => UseChunk<WorldRep>("WREXT", BuildWrMeshes));
// TODO: Sort this out so I can time it lol
ObjectHierarchy objHierarchy; ObjectHierarchy objHierarchy;
if (_file.Chunks.TryGetValue("GAM_FILE", out var gamFileChunk)) if (_file.Chunks.TryGetValue("GAM_FILE", out var gamFileChunk))
{ {
@ -127,7 +128,7 @@ public partial class Mission : Node3D
if (_file.Chunks.TryGetValue("BRLIST", out var brList)) if (_file.Chunks.TryGetValue("BRLIST", out var brList))
{ {
PlaceObjects((BrList)brList, objHierarchy); Timing.TimeStage("Object Placement", () => PlaceObjects((BrList)brList, objHierarchy));
} }
} }