mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-26 19:53:09 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user