LL perf (Textures/assets): Per-texture status polling on the main thread #305

Closed
opened 2026-10-04 14:09:15 +00:00 by sky_line · 0 comments
Owner

From the LL-origin inefficiency audit (finding T13). File/line references are from commit 0229f8872c; re-locate them before working.

Per-texture status polling on the main thread

  • Where: LLViewerFetchedTexture::updateFetch calls three lock-and-lookup round trips:
    • getRequestFinished (lltexturefetch.cpp:2848). It also copies a std::map of state timers with no tester attached (:2895).
    • getFetchState (:3232). Mostly debug use.
    • updateRequestPriority, which heap-posts a lambda per visit even when the priority is unchanged (:2946).
  • Also: gSavedSettings.getU32("TextureDiscardLevel") per request creation (llviewertexture.cpp:2364).
  • Scale: ~214 visits/frame at login (log: fetching=128374 per 600 frames).
  • Fix: one snapshot call; post only on a significant change; cached control.
  • Confirmed. S.

Verify the cost (profile or timer) before and after changing it.

From the LL-origin inefficiency audit (finding T13). File/line references are from commit 0229f8872c; re-locate them before working. **Per-texture status polling on the main thread** - **Where:** `LLViewerFetchedTexture::updateFetch` calls three lock-and-lookup round trips: - `getRequestFinished` (`lltexturefetch.cpp:2848`). It also copies a `std::map` of state timers with no tester attached (`:2895`). - `getFetchState` (`:3232`). Mostly debug use. - `updateRequestPriority`, which heap-posts a lambda per visit even when the priority is unchanged (`:2946`). - **Also:** `gSavedSettings.getU32("TextureDiscardLevel")` per request creation (`llviewertexture.cpp:2364`). - **Scale:** ~214 visits/frame at login (log: fetching=128374 per 600 frames). - **Fix:** one snapshot call; post only on a significant change; cached control. - Confirmed. S. Verify the cost (profile or timer) before and after changing it.
sky_line added this to the Slipstream project 2026-10-06 15:04:13 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#305
No description provided.