Skip to content

#6419 Async inventory cache - #6446

Merged
akleshchev merged 2 commits into
developfrom
andreyk/viewer_6419
Oct 16, 2026
Merged

akleshchev merged 2 commits into
developfrom
andreyk/viewer_6419

Conversation

@akleshchev

Copy link
Copy Markdown
Contributor
  1. Don't load massive inventory in one go on startup, only apply crititcal folders. Make sure to follow links.
  2. Apply remaining cache in a manned similar to AIS, as if folders are being loaded from network. Follow links and invoke callbacks.

Notes:

  • Technically don't need to wait for the library to parse at skeleton stage, but it's comparatively small and uniform handling is easier.
  • Potentially can split priority cache for early load, with the rest unpacking and parsing after the skeleton, but such improvements can be done later.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Fetch routing and cache-consistency defects can leave inventory missing, incomplete, or stale.

8 open findings
What changed in this PR

This PR reduces startup inventory work by loading priority folders first and applying the remaining cached contents through background fetching.

Changes:

  • Adds shared cache results with priority-folder and child-item indexes.
  • Integrates deferred cache loading, link resolution, and invalidation into background fetching.
  • Updates the cache format and narrows verbose AIS logging.
File Description
indra/​newview/​llinventorymodelbackgroundfetch.h Declares deferred-cache handling and ownership-aware callbacks.
indra/​newview/​llinventorymodelbackgroundfetch.cpp Applies deferred contents during background fetching.
indra/​newview/​llinventorymodel.h Updates cache types and serialization interfaces.
indra/​newview/​llinventorymodel.cpp Saves priorities and separates startup from deferred loading.
indra/​newview/​llinventorycache.h Defines shared cache results and bookkeeping.
indra/​newview/​llaisapi.cpp Restricts response logging to the AIS3 tag.
indra/​newview/​CMakeLists.txt Registers the new cache header.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread indra/newview/llinventorymodel.cpp
Comment thread indra/newview/llinventorymodelbackgroundfetch.cpp Outdated
Comment thread indra/newview/llinventorymodel.cpp
Comment thread indra/newview/llinventorymodel.cpp
Comment thread indra/newview/llinventorymodelbackgroundfetch.cpp Outdated
Comment thread indra/newview/llinventorymodelbackgroundfetch.cpp
Comment thread indra/newview/llinventorymodelbackgroundfetch.cpp Outdated
Comment thread indra/newview/llinventorymodelbackgroundfetch.cpp Outdated
@akleshchev
akleshchev force-pushed the andreyk/viewer_6419 branch 2 times, most recently from 4ca1774 to c3dba67 Compare October 14, 2026 22:49
@akleshchev akleshchev linked an issue Oct 14, 2026 that may be closed by this pull request
@akleshchev
akleshchev requested a balanced review from Copilot October 14, 2026 22:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread indra/newview/llinventorymodelbackgroundfetch.cpp
Comment thread indra/newview/llinventorymodel.cpp Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Non-AIS cache processing lacks a per-pass bound, and restored favorite flags lack the notification needed to refresh existing views.

2 open findings
2 resolved since last review

🧠 Review effort: Balanced

Comment thread indra/newview/llinventorymodelbackgroundfetch.cpp
Comment thread indra/newview/llinventorymodelbackgroundfetch.cpp
Comment thread indra/newview/llinventorymodelbackgroundfetch.cpp
Comment thread indra/newview/llinventorymodel.cpp Outdated
- Don't load massive inventory in one go on startup, only apply crititcal folders. Make sure to follow links and save the remainder.
- Apply remaining cache in a manned similar to AIS, as if folders are being loaded from network. Follow links and invoke callbacks.

Notes:
- Technically don't need to wait for the library to parse at skeleton stage, but it's comparatively small and uniform handling is easier.
- Potentially can split priority cache for early load, with the rest unpacking and parsing after the skeleton, but such improvements can be done later.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Large cached folders still merge without item-level batching, allowing prolonged main-thread stalls.

1 open finding
2 resolved since last review

🧠 Review effort: Balanced

Comment thread indra/newview/llinventorymodelbackgroundfetch.cpp
@akleshchev
akleshchev merged commit 71fb6fd into develop Oct 16, 2026
19 checks passed
@akleshchev
akleshchev deleted the andreyk/viewer_6419 branch October 16, 2026 19:41
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Load inventory cache on a thread

4 participants