summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryobserver.cpp
diff options
context:
space:
mode:
authorHenri Beauchamp <sldev@free.fr>2023-02-06 11:30:23 +0100
committerHenri Beauchamp <sldev@free.fr>2023-02-06 11:30:23 +0100
commitbf7faa3267e549b01131c6746202a5b6cda8e68a (patch)
tree145a475ac8fbadd980d54a6252bd5862e22a8cb4 /indra/newview/llinventoryobserver.cpp
parentc1e1f1e423d6afa1b5f954296726a49e42a3fe74 (diff)
Faster and simpler inventory category hashing.
This commit changes inventory category hashing from slow LLMD5 to fast HBXX128 hashing, and allows to use a simple LLUUID for the hash, instead of an LLMD5 instance. It also removes some old cruft dealing with unused baked texture hashing.
Diffstat (limited to 'indra/newview/llinventoryobserver.cpp')
-rw-r--r--indra/newview/llinventoryobserver.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 26d7a7a28a..2b252e369d 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -640,7 +640,7 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
// computed, or (b) a name has changed.
if (!cat_data.mIsNameHashInitialized || (mask & LLInventoryObserver::LABEL))
{
- LLMD5 item_name_hash = gInventory.hashDirectDescendentNames(cat_id);
+ LLUUID item_name_hash = gInventory.hashDirectDescendentNames(cat_id);
if (cat_data.mItemNameHash != item_name_hash)
{
cat_data.mIsNameHashInitialized = true;
@@ -701,7 +701,7 @@ bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t
{
if(init_name_hash)
{
- LLMD5 item_name_hash = gInventory.hashDirectDescendentNames(cat_id);
+ LLUUID item_name_hash = gInventory.hashDirectDescendentNames(cat_id);
mCategoryMap.insert(category_map_value_t(cat_id,LLCategoryData(cat_id, cb, version, current_num_known_descendents,item_name_hash)));
}
else
@@ -727,11 +727,10 @@ LLInventoryCategoriesObserver::LLCategoryData::LLCategoryData(
, mDescendentsCount(num_descendents)
, mIsNameHashInitialized(false)
{
- mItemNameHash.finalize();
}
LLInventoryCategoriesObserver::LLCategoryData::LLCategoryData(
- const LLUUID& cat_id, callback_t cb, S32 version, S32 num_descendents, LLMD5 name_hash)
+ const LLUUID& cat_id, callback_t cb, S32 version, S32 num_descendents, const LLUUID& name_hash)
: mCatID(cat_id)
, mCallback(cb)