LL perf (Objects/world): setTETexture does a texture-map lookup before checking whether anything changed #314

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

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

setTETexture does a texture-map lookup before checking whether anything changed

  • Where: llviewerobject.cpp:5568-5574: getFetchedTexture, a std::map<LLTextureKey> find with ~15 LLUUID::operator< calls, happens before setTETextureCore compares ids (:5476).
  • Frequency: runs per face on every TE and full update (llprimitive.cpp:1441-1470).
  • Fix: compare first; make mUUIDMap (llviewertexturelist.h:227) an unordered_map.
  • Confirmed. Likely one source of the 1.4% LLUUID::operator<. S.

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

From the LL-origin inefficiency audit (finding O7). File/line references are from commit 0229f8872c; re-locate them before working. **`setTETexture` does a texture-map lookup before checking whether anything changed** - **Where:** `llviewerobject.cpp:5568-5574`: `getFetchedTexture`, a `std::map<LLTextureKey>` find with ~15 `LLUUID::operator<` calls, happens before `setTETextureCore` compares ids (`:5476`). - **Frequency:** runs per face on every TE and full update (`llprimitive.cpp:1441-1470`). - **Fix:** compare first; make `mUUIDMap` (`llviewertexturelist.h:227`) an `unordered_map`. - Confirmed. Likely one source of the 1.4% `LLUUID::operator<`. 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:14 +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#314
No description provided.