From b9b38db5678556e1aa2710a86004dc5a14f97242 Mon Sep 17 00:00:00 2001 From: "Brad Kittenbrink (Brad Linden)" Date: Fri, 28 Jul 2023 16:52:06 -0700 Subject: Fix for SL-19968 objects missing timing bug due to stall during login ensure inventory skeleton loading doesn't block the message system from processing packets. --- indra/newview/llinventorymodel.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index f7c327c699..4137bfa788 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, 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_COLOR("inventory load from file", 0xFF1111); + 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 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(); -- cgit v1.2.3 From dfb44aec706532cd26a1fcc6415cc7fdadec9907 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Thu, 2 Nov 2023 17:28:10 -0700 Subject: Fix build error from overly fancy tracy macro usage that nobody else is using for DRTVWR-559 --- indra/newview/llinventorymodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 4137bfa788..74a5442586 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -3323,7 +3323,7 @@ bool LLInventoryModel::loadFromFile(const std::string& filename, LLInventoryModel::changed_items_t& cats_to_update, bool &is_cache_obsolete) { - LL_PROFILE_ZONE_NAMED_COLOR("inventory load from file", 0xFF1111); + LL_PROFILE_ZONE_NAMED("inventory load from file"); if(filename.empty()) { -- cgit v1.2.3