Skip to content

Improve inventory finder floater performance: Don't parse XUI tree each frame #2640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions indra/newview/llinventoryfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
boost::char_separator<char> sep("+");
tokenizer tokens(filter_sub_string_new, sep);

for (auto token_iter : tokens)
for (const auto& token_iter : tokens)
{
mFilterTokens.push_back(token_iter);
}
Expand Down Expand Up @@ -1025,7 +1025,7 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
}

// Cancel out UUID once the search string is modified
if (mFilterOps.mFilterTypes == FILTERTYPE_UUID)
if (mFilterOps.mFilterTypes & FILTERTYPE_UUID)
{
mFilterOps.mFilterTypes &= ~FILTERTYPE_UUID;
mFilterOps.mFilterUUID = LLUUID::null;
Expand Down Expand Up @@ -1707,7 +1707,7 @@ std::string LLInventoryFilter::getEmptyLookupMessage(bool is_empty_folder) const
}
}

bool LLInventoryFilter::areDateLimitsSet()
bool LLInventoryFilter::areDateLimitsSet() const
{
return mFilterOps.mMinDate != time_min()
|| mFilterOps.mMaxDate != time_max()
Expand Down
2 changes: 1 addition & 1 deletion indra/newview/llinventoryfilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class LLInventoryFilter : public LLFolderViewFilter
bool checkAgainstFilterThumbnails(const LLUUID& object_id) const;

private:
bool areDateLimitsSet();
bool areDateLimitsSet() const;
bool checkAgainstFilterSubString(const std::string& desc) const;
bool checkAgainstFilterType(const class LLFolderViewModelItemInventory* listener) const;
bool checkAgainstFilterType(const LLInventoryItem* item) const;
Expand Down
Loading
Loading