Repurpose unused Timer.cs and add some loading perf metrics

This commit is contained in:
Pavlos Touboulidis
2014-04-23 01:58:30 +03:00
parent 035834978d
commit 60732bd9bd
5 changed files with 71 additions and 35 deletions

View File

@@ -118,11 +118,17 @@ namespace OpenRA
// Mount map package so custom assets can be used. TODO: check priority.
GlobalFileSystem.Mount(GlobalFileSystem.OpenPackage(map.Path, null, int.MaxValue));
Rules.LoadRules(Manifest, map);
using (new Support.PerfTimer("LoadRules"))
{
Rules.LoadRules(Manifest, map);
}
SpriteLoader = new SpriteLoader(Rules.TileSets[map.Tileset].Extensions, SheetBuilder);
// TODO: Don't load the sequences for assets that are not used in this tileset. Maybe use the existing EditorTilesetFilters.
SequenceProvider.Initialize(Manifest.Sequences, map.Sequences);
using (new Support.PerfTimer("SequenceProvider.Initialize"))
{
// TODO: Don't load the sequences for assets that are not used in this tileset. Maybe use the existing EditorTilesetFilters.
SequenceProvider.Initialize(Manifest.Sequences, map.Sequences);
}
VoxelProvider.Initialize(Manifest.VoxelSequences, map.VoxelSequences);
return map;
}