From ae15778eebafa6c8f69cedd51fe5fe1a5f7b543b Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 1 Jun 2012 15:51:14 -0500 Subject: Add some timers. --- indra/llcharacter/llmotioncontroller.cpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'indra/llcharacter/llmotioncontroller.cpp') diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index bb892f4a7f..e7ec83efc0 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -539,11 +539,14 @@ void LLMotionController::updateIdleActiveMotions() } } +static LLFastTimer::DeclareTimer FTM_UPDATE_MOTIONS_BY_TYPE("Update Motions By Type"); + //----------------------------------------------------------------------------- // updateMotionsByType() //----------------------------------------------------------------------------- void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type) { + LLFastTimer t(FTM_UPDATE_MOTIONS_BY_TYPE); BOOL update_result = TRUE; U8 last_joint_signature[LL_CHARACTER_MAX_JOINTS]; @@ -795,6 +798,9 @@ void LLMotionController::updateLoadingMotions() // call updateMotion() or updateMotionsMinimal() every frame //----------------------------------------------------------------------------- +static LLFastTimer::DeclareTimer FTM_UPDATE_MOTION_PURGE_EXCESS("Purge Excess Motions"); +static LLFastTimer::DeclareTimer FTM_UPDATE_LOADING_MOTIONS("Update Loading Motions"); + //----------------------------------------------------------------------------- // updateMotion() //----------------------------------------------------------------------------- @@ -808,8 +814,11 @@ void LLMotionController::updateMotions(bool force_update) mPrevTimerElapsed = cur_time; mLastTime = mAnimTime; - // Always cap the number of loaded motions - purgeExcessMotions(); + { + LLFastTimer t(FTM_UPDATE_MOTION_PURGE_EXCESS); + // Always cap the number of loaded motions + purgeExcessMotions(); + } // Update timing info for this time step. if (!mPaused) @@ -831,7 +840,11 @@ void LLMotionController::updateMotions(bool force_update) mLastInterp = interp; } - updateLoadingMotions(); + { + LLFastTimer t(FTM_UPDATE_LOADING_MOTIONS); + updateLoadingMotions(); + } + return; } @@ -849,7 +862,10 @@ void LLMotionController::updateMotions(bool force_update) } } - updateLoadingMotions(); + { + LLFastTimer t(FTM_UPDATE_LOADING_MOTIONS); + updateLoadingMotions(); + } resetJointSignatures(); -- cgit v1.2.3 From 92ee373e45b34d5eb7e403480ae1f579b27c4eb6 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 5 Jun 2012 12:55:17 -0500 Subject: MAINT-646 Factor std::set out of lloctree --- indra/llcharacter/llmotioncontroller.cpp | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) (limited to 'indra/llcharacter/llmotioncontroller.cpp') diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index e7ec83efc0..236b8c616d 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -539,14 +539,11 @@ void LLMotionController::updateIdleActiveMotions() } } -static LLFastTimer::DeclareTimer FTM_UPDATE_MOTIONS_BY_TYPE("Update Motions By Type"); - //----------------------------------------------------------------------------- // updateMotionsByType() //----------------------------------------------------------------------------- void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type) { - LLFastTimer t(FTM_UPDATE_MOTIONS_BY_TYPE); BOOL update_result = TRUE; U8 last_joint_signature[LL_CHARACTER_MAX_JOINTS]; @@ -798,9 +795,6 @@ void LLMotionController::updateLoadingMotions() // call updateMotion() or updateMotionsMinimal() every frame //----------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_UPDATE_MOTION_PURGE_EXCESS("Purge Excess Motions"); -static LLFastTimer::DeclareTimer FTM_UPDATE_LOADING_MOTIONS("Update Loading Motions"); - //----------------------------------------------------------------------------- // updateMotion() //----------------------------------------------------------------------------- @@ -814,12 +808,9 @@ void LLMotionController::updateMotions(bool force_update) mPrevTimerElapsed = cur_time; mLastTime = mAnimTime; - { - LLFastTimer t(FTM_UPDATE_MOTION_PURGE_EXCESS); - // Always cap the number of loaded motions - purgeExcessMotions(); - } - + // Always cap the number of loaded motions + purgeExcessMotions(); + // Update timing info for this time step. if (!mPaused) { @@ -840,11 +831,8 @@ void LLMotionController::updateMotions(bool force_update) mLastInterp = interp; } - { - LLFastTimer t(FTM_UPDATE_LOADING_MOTIONS); - updateLoadingMotions(); - } - + updateLoadingMotions(); + return; } @@ -862,11 +850,8 @@ void LLMotionController::updateMotions(bool force_update) } } - { - LLFastTimer t(FTM_UPDATE_LOADING_MOTIONS); - updateLoadingMotions(); - } - + updateLoadingMotions(); + resetJointSignatures(); if (mPaused && !force_update) -- cgit v1.2.3 From 575aa87300725146dbec95f5ad20ba0b70f5edea Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 6 Jun 2012 17:16:16 -0500 Subject: MAINT-646 Vectorize LLPolyMesh --- indra/llcharacter/llmotioncontroller.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/llcharacter/llmotioncontroller.cpp') diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 236b8c616d..4f6351709e 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -542,6 +542,8 @@ void LLMotionController::updateIdleActiveMotions() //----------------------------------------------------------------------------- // updateMotionsByType() //----------------------------------------------------------------------------- +static LLFastTimer::DeclareTimer FTM_MOTION_ON_UPDATE("Motion onUpdate"); + void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type) { BOOL update_result = TRUE; @@ -699,7 +701,10 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty } // perform motion update - update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); + { + LLFastTimer t(FTM_MOTION_ON_UPDATE); + update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); + } } //********************** @@ -862,11 +867,12 @@ void LLMotionController::updateMotions(bool force_update) { // update additive motions updateAdditiveMotions(); + resetJointSignatures(); - + // update all regular motions updateRegularMotions(); - + if (use_quantum) { mPoseBlender.blendAndCache(TRUE); -- cgit v1.2.3