diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 9c949622c7..9eb2cccc13 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -251,8 +251,11 @@ namespace OpenRA { map = modData.PrepareMap(mapUID); } - orderManager.world = new World(modData.Manifest, map, orderManager, isShellmap); - orderManager.world.Timestep = Timestep; + using (new PerfTimer("NewWorld")) + { + orderManager.world = new World(modData.Manifest, map, orderManager, isShellmap); + orderManager.world.Timestep = Timestep; + } worldRenderer = new WorldRenderer(orderManager.world); using (new PerfTimer("LoadComplete")) { diff --git a/OpenRA.Game/Map/MapCache.cs b/OpenRA.Game/Map/MapCache.cs index d745bf39e3..135ab6ce10 100755 --- a/OpenRA.Game/Map/MapCache.cs +++ b/OpenRA.Game/Map/MapCache.cs @@ -47,9 +47,12 @@ namespace OpenRA { try { - var map = new Map(path, manifest.Mod.Id); - if (manifest.MapCompatibility.Contains(map.RequiresMod)) - previews[map.Uid].UpdateFromMap(map); + using (new Support.PerfTimer(path)) + { + var map = new Map(path, manifest.Mod.Id); + if (manifest.MapCompatibility.Contains(map.RequiresMod)) + previews[map.Uid].UpdateFromMap(map); + } } catch (Exception e) { diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs index 30e9ae7de2..1d1d12213a 100644 --- a/OpenRA.Game/World.cs +++ b/OpenRA.Game/World.cs @@ -148,7 +148,10 @@ namespace OpenRA public void LoadComplete(WorldRenderer wr) { foreach (var wlh in WorldActor.TraitsImplementing()) - wlh.WorldLoaded(this, wr); + { + using (new Support.PerfTimer(wlh.GetType().Name + ".WorldLoaded")) + wlh.WorldLoaded(this, wr); + } } public Actor CreateActor(string name, TypeDictionary initDict)