diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 73f664ef61..ef802dfbd8 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5007,8 +5007,6 @@ void Application::update(float deltaTime) { } } - PerformanceTimer perfTimer("misc"); - bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings); PerformanceWarning warn(showWarnings, "Application::update()"); @@ -5017,11 +5015,13 @@ void Application::update(float deltaTime) { // TODO: break these out into distinct perfTimers when they prove interesting { PROFILE_RANGE(app, "PickManager"); + PerformanceTimer perfTimer("pickManager"); DependencyManager::get()->update(); } { PROFILE_RANGE(app, "PointerManager"); + PerformanceTimer perfTimer("pointerManager"); DependencyManager::get()->update(); } @@ -5047,8 +5047,8 @@ void Application::update(float deltaTime) { // Update my voxel servers with my current voxel query... { PROFILE_RANGE_EX(app, "QueryOctree", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount()); - QMutexLocker viewLocker(&_viewMutex); PerformanceTimer perfTimer("queryOctree"); + QMutexLocker viewLocker(&_viewMutex); quint64 sinceLastQuery = now - _lastQueriedTime; const quint64 TOO_LONG_SINCE_LAST_QUERY = 3 * USECS_PER_SECOND; bool queryIsDue = sinceLastQuery > TOO_LONG_SINCE_LAST_QUERY; @@ -5084,12 +5084,14 @@ void Application::update(float deltaTime) { } } - avatarManager->postUpdate(deltaTime, getMain3DScene()); - + { + PerformanceTimer perfTimer("avatarManager/postUpdate"); + avatarManager->postUpdate(deltaTime, getMain3DScene()); + } { - PROFILE_RANGE_EX(app, "PreRenderLambdas", 0xffff0000, (uint64_t)0); - + PROFILE_RANGE_EX(app, "PostUpdateLambdas", 0xffff0000, (uint64_t)0); + PerformanceTimer perfTimer("postUpdateLambdas"); std::unique_lock guard(_postUpdateLambdasLock); for (auto& iter : _postUpdateLambdas) { iter.second(); @@ -5098,6 +5100,7 @@ void Application::update(float deltaTime) { } editRenderArgs([this](AppRenderArgs& appRenderArgs) { + PerformanceTimer perfTimer("editRenderArgs"); appRenderArgs._headPose= getHMDSensorPose(); auto myAvatar = getMyAvatar(); @@ -5211,12 +5214,20 @@ void Application::update(float deltaTime) { } }); - AnimDebugDraw::getInstance().update(); + { + PerformanceTimer perfTimer("limitless"); + AnimDebugDraw::getInstance().update(); + } - DependencyManager::get()->update(); + { + PerformanceTimer perfTimer("limitless"); + DependencyManager::get()->update(); + } - // Game loop is done, mark the end of the frame for the scene transactions and the render loop to take over - getMain3DScene()->enqueueFrame(); + { // Game loop is done, mark the end of the frame for the scene transactions and the render loop to take over + PerformanceTimer perfTimer("enqueueFrame"); + getMain3DScene()->enqueueFrame(); + } } void Application::sendAvatarViewFrustum() { diff --git a/interface/src/LODManager.cpp b/interface/src/LODManager.cpp index 9e6fabd439..087a93cffe 100644 --- a/interface/src/LODManager.cpp +++ b/interface/src/LODManager.cpp @@ -50,7 +50,7 @@ float LODManager::getLODIncreaseFPS() { const float LOD_ADJUST_RUNNING_AVG_TIMESCALE = 0.1f; // sec // // Assuming the measured value is affected by logic invoked by the runningAverage bumping up against its -// thresholds, we expect the adjustment to introduce a step-function. We want the runningAverage settle +// thresholds, we expect the adjustment to introduce a step-function. We want the runningAverage to settle // to the new value BEFORE we test it aginst its thresholds again. Hence we test on a period that is a few // multiples of the running average timescale: const uint64_t LOD_AUTO_ADJUST_PERIOD = 5 * (uint64_t)(LOD_ADJUST_RUNNING_AVG_TIMESCALE * (float)USECS_PER_MSEC); // usec