From 5d4e2c91b8c4f7e14ef3604df9f1050b05c00380 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 24 Jul 2025 19:55:34 +0300 Subject: #3969 Log time it takes to create inventory from cache --- indra/newview/llinventorymodel.cpp | 4 +++- indra/newview/llinventorypanel.cpp | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index cf1efd283a..f1ca69416b 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2682,6 +2682,7 @@ bool LLInventoryModel::loadSkeleton( LL_PROFILE_ZONE_SCOPED; LL_DEBUGS(LOG_INV) << "importing inventory skeleton for " << owner_id << LL_ENDL; + LLTimer timer; typedef std::set, InventoryIDPtrLess> cat_set_t; cat_set_t temp_cats; bool rv = true; @@ -2966,7 +2967,8 @@ bool LLInventoryModel::loadSkeleton( } LL_INFOS(LOG_INV) << "Successfully loaded " << cached_category_count - << " categories and " << cached_item_count << " items from cache." + << " categories and " << cached_item_count << " items from cache" + << " after " << timer.getElapsedTimeF32() << " seconds." << LL_ENDL; return rv; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 5a067ba454..443a0022fb 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -364,9 +364,28 @@ void LLInventoryPanel::initializeViewBuilding() if (mInventory->isInventoryUsable() && LLStartUp::getStartupState() <= STATE_WEARABLES_WAIT) { + LLTimer timer; // Usually this happens on login, so we have less time constraits, but too long and we can cause a disconnect const F64 max_time = 20.f; initializeViews(max_time); + + if (mViewsInitialized == VIEWS_INITIALIZED) + { + LL_INFOS("Inventory") + << "Fully initialized inventory panel " << getName() + << " with " << (S32)mItemMap.size() + << " views in " << timer.getElapsedTimeF32() << " seconds." + << LL_ENDL; + } + else + { + LL_INFOS("Inventory") + << "Partially initialized inventory panel " << getName() + << " with " << (S32)mItemMap.size() + << " views in " << timer.getElapsedTimeF32() + << " seconds. Pending known views: " << (S32)mBuildViewsQueue.size() + << LL_ENDL; + } } else { -- cgit v1.2.3