Change profiling calls to get a better view of what is actually slow and what is not.

This was SVN commit r18438.
This commit is contained in:
wraitii
2016-06-25 13:12:35 +00:00
parent d2e081b602
commit 898ab5229b
14 changed files with 58 additions and 15 deletions
+8 -2
View File
@@ -480,8 +480,11 @@ void CSimulation2Impl::UpdateComponents(CSimContext& simContext, fixed turnLengt
CComponentManager& componentManager = simContext.GetComponentManager();
CMessageTurnStart msgTurnStart;
componentManager.BroadcastMessage(msgTurnStart);
{
PROFILE2("Sim - Update Start");
CMessageTurnStart msgTurnStart;
componentManager.BroadcastMessage(msgTurnStart);
}
CmpPtr<ICmpPathfinder> cmpPathfinder(simContext, SYSTEM_ENTITY);
if (cmpPathfinder)
@@ -505,6 +508,7 @@ void CSimulation2Impl::UpdateComponents(CSimContext& simContext, fixed turnLengt
// Send all the update phases
{
PROFILE2("Sim - Update");
CMessageUpdate msgUpdate(turnLengthFixed);
componentManager.BroadcastMessage(msgUpdate);
}
@@ -518,10 +522,12 @@ void CSimulation2Impl::UpdateComponents(CSimContext& simContext, fixed turnLengt
cmpPathfinder->ProcessSameTurnMoves();
{
PROFILE2("Sim - Motion Unit");
CMessageUpdate_MotionUnit msgUpdate(turnLengthFixed);
componentManager.BroadcastMessage(msgUpdate);
}
{
PROFILE2("Sim - Update Final");
CMessageUpdate_Final msgUpdate(turnLengthFixed);
componentManager.BroadcastMessage(msgUpdate);
}