#3729 Reduce inventory memory overhead#5867
Open
akleshchev wants to merge 3 commits into
Open
Conversation
04b66b1 to
fa58ebb
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce inventory UI memory overhead by removing per-bridge cached display-name storage and moving system-folder display-name localization/caching into the inventory model (LLViewerInventoryCategory), while keeping a cached uppercase “searchable name” for filtering/sorting.
Changes:
- Added on-demand, cached
LLViewerInventoryCategory::getDisplayName()and display-name construction for protected/library folders. - Renamed bridge cache invalidation/build hooks from “display name” to “searchable name” and updated
LLInventoryPanelrefresh paths accordingly. - Updated
LLInvFVBridge::getDisplayName()to fetch names directly from the inventory model (category display name or item name).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| indra/newview/llviewerinventory.h | Adds display-name caching API/state to LLViewerInventoryCategory. |
| indra/newview/llviewerinventory.cpp | Implements category display-name generation for protected/library folders. |
| indra/newview/llinventorypanel.cpp | Switches relabel/refresh invalidation to clear the searchable-name cache. |
| indra/newview/llinventorybridge.h | Removes bridge mDisplayName storage and renames cache build/clear hooks to searchable-name. |
| indra/newview/llinventorybridge.cpp | Updates bridge display-name lookup to consult the model; refactors item searchable-name building and related suffix logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
032c8bd to
a8eaace
Compare
marchcat
approved these changes
May 26, 2026
maxim-productengine
approved these changes
May 26, 2026
a8eaace to
53e02ca
Compare
17a7b66 to
a079db8
Compare
UI elements already cache display name, getDisplayName() calls are rare and only come with other calls. For items, any UI calls already engage internal getItem optimizations, so doing getItem in getDisplayName() has negligible performance overhead while avoiding storing a dupplicate of item's name. This also cuts performance overhead from allocations, so it's a net benefit performance wise on first load. System folders do utilize display names that are different from default names, but they are not panel specific, they are global localizations. Store those in the model, not in the bridge. Usage example: LLFolderViewItem::postBuild() already calls getName after getDisplayName(), so getItem will utilize mLastItem either way and the only refresh needed happens if user renames the item. Without the user the update happens only once.
Tooltips are just names, there is no point buffering them.
a079db8 to
f6d48ed
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UI elements already cache display name, getDisplayName() calls are rare and only come with other calls.
For items, any UI calls already engage internal getItem optimizations, so doing getItem in getDisplayName() has negligible performance overhead while avoiding storing a dupplicate of item's name. This also cuts performance overhead from allocations, so it's a net benefit performance wise on first load.
System folders do utilize display names that are different from default names, but they are not panel specific, they are global localizations. Store those in the model, not in the bridge.
Usage example: LLFolderViewItem::postBuild() already calls getName after getDisplayName(), so getItem will utilize mLastItem either way and the only refresh needed happens if user renames the item. Without the user the update happens only once.