From 95411544c0ffb8bebea1afe7693110d1df1e4fe9 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 2 Feb 2023 21:25:05 -0500
Subject: [PATCH] Faster object list

---
 indra/newview/llmaterialmgr.h        |  1 -
 indra/newview/llviewerobjectlist.cpp |  4 ++--
 indra/newview/llviewerobjectlist.h   | 12 +++++++-----
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/indra/newview/llmaterialmgr.h b/indra/newview/llmaterialmgr.h
index f0fad385751..495de2a3e04 100644
--- a/indra/newview/llmaterialmgr.h
+++ b/indra/newview/llmaterialmgr.h
@@ -121,7 +121,6 @@ class LLMaterialMgr final : public LLSingleton<LLMaterialMgr>
 
 
 	get_queue_t				mGetQueue;
-    uuid_set_t              mRegionGets;
 	get_pending_map_t		mGetPending;
 	get_callback_map_t		mGetCallbacks;
 
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 02549235fb0..fc92434cbc5 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -1253,7 +1253,7 @@ void LLViewerObjectList::fetchPhisicsFlagsCoro(std::string url)
     LLSD idList;
     U32 objectIndex = 0;
 
-    for (uuid_set_t::iterator it = mStalePhysicsFlags.begin(); it != mStalePhysicsFlags.end();)
+    for (auto it = mStalePhysicsFlags.begin(); it != mStalePhysicsFlags.end();)
     {
         // Check to see if a request for this object
         // has already been made.
@@ -1263,7 +1263,7 @@ void LLViewerObjectList::fetchPhisicsFlagsCoro(std::string url)
             idList[objectIndex++] = *it;
         }
 
-        mStalePhysicsFlags.erase(it++);
+        it = mStalePhysicsFlags.erase(it);
 
         if (objectIndex >= MAX_CONCURRENT_PHYSICS_REQUESTS)
         {
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index 31f154141df..0e23b54c209 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -214,17 +214,19 @@ class LLViewerObjectList
 
 	vobj_list_t mMapObjects;
 
-    uuid_set_t   mDeadObjects;
+
+	using uuid_hash_set_t = boost::unordered_set<LLUUID>;
+    uuid_hash_set_t   mDeadObjects;
 
 	boost::unordered_flat_map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
 
 	//set of objects that need to update their cost
-    uuid_set_t   mStaleObjectCost;
-    uuid_set_t   mPendingObjectCost;
+    uuid_hash_set_t   mStaleObjectCost;
+    uuid_hash_set_t   mPendingObjectCost;
 
 	//set of objects that need to update their physics flags
-    uuid_set_t   mStalePhysicsFlags;
-    uuid_set_t   mPendingPhysicsFlags;
+    uuid_hash_set_t   mStalePhysicsFlags;
+    uuid_hash_set_t   mPendingPhysicsFlags;
 
 	std::vector<LLDebugBeacon> mDebugBeacons;
 
-- 
GitLab