summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-11-06 17:34:13 +0800
committerErik Kundiman <erik@megapahit.org>2023-11-06 17:34:13 +0800
commitcd8470549bb2550acedca9bb78cb9b4580059170 (patch)
tree3fb65732c810be733534674b692c5eecf0c9e5ed /indra/newview/llinventorymodel.cpp
parentce43d94c9de73eda527f2f4bd50fe3e144beaee2 (diff)
parent89e4e6993f3cb11dd2206795c30834594880f52f (diff)
Merge remote-tracking branch 'secondlife/DRTVWR-559' into DRTVWR-559
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index f7c327c699..74a5442586 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -66,6 +66,7 @@
#include "bufferstream.h"
#include "llcorehttputil.h"
#include "hbxxh.h"
+#include "llstartup.h"
//#define DIFF_INVENTORY_FILES
#ifdef DIFF_INVENTORY_FILES
@@ -2642,6 +2643,7 @@ bool LLInventoryModel::loadSkeleton(
const LLSD& options,
const LLUUID& owner_id)
{
+ LL_PROFILE_ZONE_SCOPED;
LL_DEBUGS(LOG_INV) << "importing inventory skeleton for " << owner_id << LL_ENDL;
typedef std::set<LLPointer<LLViewerInventoryCategory>, InventoryIDPtrLess> cat_set_t;
@@ -3321,6 +3323,8 @@ bool LLInventoryModel::loadFromFile(const std::string& filename,
LLInventoryModel::changed_items_t& cats_to_update,
bool &is_cache_obsolete)
{
+ LL_PROFILE_ZONE_NAMED("inventory load from file");
+
if(filename.empty())
{
LL_ERRS(LOG_INV) << "filename is Null!" << LL_ENDL;
@@ -3338,6 +3342,7 @@ bool LLInventoryModel::loadFromFile(const std::string& filename,
is_cache_obsolete = true; // Obsolete until proven current
+ U64 lines_count = 0U;
std::string line;
LLPointer<LLSDParser> parser = new LLSDNotationParser();
while (std::getline(file, line))
@@ -3386,7 +3391,7 @@ bool LLInventoryModel::loadFromFile(const std::string& filename,
{
if(inv_item->getUUID().isNull())
{
- LL_WARNS(LOG_INV) << "Ignoring inventory with null item id: "
+ LL_DEBUGS(LOG_INV) << "Ignoring inventory with null item id: "
<< inv_item->getName() << LL_ENDL;
}
else
@@ -3402,6 +3407,13 @@ bool LLInventoryModel::loadFromFile(const std::string& filename,
}
}
}
+
+ static constexpr U64 BATCH_SIZE = 512U;
+ if ((++lines_count % BATCH_SIZE) == 0)
+ {
+ // SL-19968 - make sure message system code gets a chance to run every so often
+ pump_idle_startup_network();
+ }
}
file.close();