Conversation
- various improvements - lazily creates the UI wigets for categories when their parent is expanded
Allow builds to be manually triggered
- store cache keys as std::string to avoid dangling references - refresh parent entry on rename and skip unnamed views
- store cache keys as std::string to avoid dangling references - refresh parent entry on rename and skip unnamed views
#4893 Async Inventory review improvements
|
I feel like this bundle of optimizations needs to be split into multiple separate ones and reviewer separately. |
…llbacks on early exit
…ndle duplicate names
… tracking semantics
… widgets are created
* Add channel based streaming priority. * Lessen the aggressiveness of the discards.
…pick Add texture streaming "channels" (#5442)
…l fetches, track COF UUID, library root non-essential
#4893 Async inventory review fixes
|
Every file in this PR is directly related to async inventory loading. The three files that may look "unrelated" (llview.cpp/h, llpanel.cpp) are explained below. llview.cpp/h: O(1) child view lookup cacheThe existing findChildView() does a linear scan over mChildList. With synchronous loading, all inventory widgets are built in one batch at login, so this cost is paid once. With async loading, widgets are created lazily when folders are expanded (BUILD_ONE_FOLDER mode). This means findChildView() is called repeatedly during normal browsing, not just at startup — the linear scan became a bottleneck. The fix adds an unordered_map mChildNameCache to LLView for O(1) lookups, maintained in addChild(), removeChild() and setName(). llpanel.cpp: reduce repeated singleton/accessor overhead in initPanelXML()initPanelXML() runs for every panel constructed from XML, including every inventory folder widget. With lazy creation, it fires much more often during the session. The changes cache three values that were re-fetched on every call: LLUICtrlFactory::getInstance(), node->getName() and child_registry_t::instance(). Also eliminates a redundant local string copy in favor of using mXMLFilename directly. Why in this PRAll three files address performance issues caused by the lazy-creation approach. Without the cache, expanding a folder with hundreds of children would do O(n^2) string comparisons. The llpanel changes reduce per-widget overhead that compounds when widgets are created on-demand. They they are not unrelated work. |
My problems with this solution:
|
|
You're right, thanks! After tracing all 31 findChildView() call sites, none of them operate on LLFolderViewFolder or LLFolderView instances. The inventory code paths use direct mItemMap lookups by UUID, not name-based findChildView. So I removed the mChildNameCache from LLView entirely (d4a557a, in #5746). The llpanel.cpp changes (caching getInstance/getName/instance locally in initPanelXML) are kept – those are local variable optimizations with zero blast radius beyond the function scope. |
I agree that it is a good change, but not specific to async inventory. |
Summary:
Introduces asynchronous inventory skeleton loading via AIS to accelerate login (up to 12s faster for 100k+ item inventories) by hydrating from cache, fetching essentials on-demand, and throttling UI updates. Adds debug settings for concurrency/timeouts, fixes cache persistence/dehydration, and optimizes UI with lazy folder widget creation (O(n) parent-child mapping via caching).
Testing:
QA-only
ForceAsyncInventorySkeletontoggle (enabled by default); monitor login times/cache integrity. No breaking changes.Additional test: