diff options
| author | Rye <rye@alchemyviewer.org> | 2026-01-09 10:37:55 -0500 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-01-21 22:07:08 +0200 |
| commit | b957c08f02786ffc004cd8077addfe44682624eb (patch) | |
| tree | f8b86f807645d191d595ca3bcb4fa9ef98f0e0fb /indra/newview | |
| parent | 8b3558e59f9c67abe4c958f01206bb630ee2311f (diff) | |
Optimize gObjectList findObject and getUUIDFromLocal with unordered_map due to frequent find access
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llviewerobjectlist.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 50edb408c7..34e5cc9de8 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -174,7 +174,7 @@ bool LLViewerObjectList::removeFromLocalIDTable(LLViewerObject* objectp) U32 local_id = objectp->mLocalID; U64 indexid = (((U64)objectp->mRegionIndex) << 32) | (U64)local_id; - std::map<U64, LLUUID>::iterator iter = mIndexAndLocalIDToUUID.find(indexid); + auto iter = mIndexAndLocalIDToUUID.find(indexid); if (iter == mIndexAndLocalIDToUUID.end()) { return false; diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 547ef9fb2d..adc90a0483 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -204,7 +204,7 @@ protected: uuid_set_t mDeadObjects; - std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap; + std::unordered_map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap; //set of objects that need to update their cost uuid_set_t mStaleObjectCost; @@ -221,7 +221,7 @@ protected: static U32 sSimulatorMachineIndex; std::map<U64, U32> mIPAndPortToIndex; - std::map<U64, LLUUID> mIndexAndLocalIDToUUID; + std::unordered_map<U64, LLUUID> mIndexAndLocalIDToUUID; friend class LLViewerObject; |
