Skip to content

Commit 5d4e2c9

Browse files
committed
#3969 Log time it takes to create inventory from cache
1 parent 5c746ae commit 5d4e2c9

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

indra/newview/llinventorymodel.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2682,6 +2682,7 @@ bool LLInventoryModel::loadSkeleton(
26822682
LL_PROFILE_ZONE_SCOPED;
26832683
LL_DEBUGS(LOG_INV) << "importing inventory skeleton for " << owner_id << LL_ENDL;
26842684

2685+
LLTimer timer;
26852686
typedef std::set<LLPointer<LLViewerInventoryCategory>, InventoryIDPtrLess> cat_set_t;
26862687
cat_set_t temp_cats;
26872688
bool rv = true;
@@ -2966,7 +2967,8 @@ bool LLInventoryModel::loadSkeleton(
29662967
}
29672968

29682969
LL_INFOS(LOG_INV) << "Successfully loaded " << cached_category_count
2969-
<< " categories and " << cached_item_count << " items from cache."
2970+
<< " categories and " << cached_item_count << " items from cache"
2971+
<< " after " << timer.getElapsedTimeF32() << " seconds."
29702972
<< LL_ENDL;
29712973

29722974
return rv;

indra/newview/llinventorypanel.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,28 @@ void LLInventoryPanel::initializeViewBuilding()
364364
if (mInventory->isInventoryUsable()
365365
&& LLStartUp::getStartupState() <= STATE_WEARABLES_WAIT)
366366
{
367+
LLTimer timer;
367368
// Usually this happens on login, so we have less time constraits, but too long and we can cause a disconnect
368369
const F64 max_time = 20.f;
369370
initializeViews(max_time);
371+
372+
if (mViewsInitialized == VIEWS_INITIALIZED)
373+
{
374+
LL_INFOS("Inventory")
375+
<< "Fully initialized inventory panel " << getName()
376+
<< " with " << (S32)mItemMap.size()
377+
<< " views in " << timer.getElapsedTimeF32() << " seconds."
378+
<< LL_ENDL;
379+
}
380+
else
381+
{
382+
LL_INFOS("Inventory")
383+
<< "Partially initialized inventory panel " << getName()
384+
<< " with " << (S32)mItemMap.size()
385+
<< " views in " << timer.getElapsedTimeF32()
386+
<< " seconds. Pending known views: " << (S32)mBuildViewsQueue.size()
387+
<< LL_ENDL;
388+
}
370389
}
371390
else
372391
{

0 commit comments

Comments
 (0)