LL perf (Avatar/animation): Name-tag and chat-bubble work every frame #335

Closed
opened 2026-10-04 14:09:22 +00:00 by sky_line · 1 comment
Owner

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

Name-tag and chat-bubble work every frame

  • Name tag: idleUpdateNameTagText does getNVPair ×3 (each gNVNameTable.addString, bumping an unbounded refcount, llstringtable.cpp:243), 3 set finds, buddy/RLV checks, and getHasMissingParts() (a param walk with a dynamic_cast each, llvoavatar.cpp:9607-9630).
  • Chat bubble: with bubbles on, it is fully rebuilt every frame (llvoavatar.cpp:3657-3720; llhudnametag.cpp:395-466: UTF-8→wide, tokenizer, glyph measure, fresh width-cache map).
  • Other per-frame costs: idleCalcNameTagPosition computes even when no tag is shown (llvoavatar.cpp:2652, 2763); gSavedSettings.getF32("ChatBubbleOpacity") per tag (llhudnametag.cpp:304).
  • Fix: cache NV pointers; rebuild on events; compute position lazily.
  • Confirmed. S-M.

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

From the LL-origin inefficiency audit (finding A12). File/line references are from commit 0229f8872c; re-locate them before working. **Name-tag and chat-bubble work every frame** - **Name tag:** `idleUpdateNameTagText` does `getNVPair` ×3 (each `gNVNameTable.addString`, bumping an unbounded refcount, `llstringtable.cpp:243`), 3 set finds, buddy/RLV checks, and `getHasMissingParts()` (a param walk with a `dynamic_cast` each, `llvoavatar.cpp:9607-9630`). - **Chat bubble:** with bubbles on, it is fully rebuilt every frame (`llvoavatar.cpp:3657-3720`; `llhudnametag.cpp:395-466`: UTF-8→wide, tokenizer, glyph measure, fresh width-cache map). - **Other per-frame costs:** `idleCalcNameTagPosition` computes even when no tag is shown (`llvoavatar.cpp:2652, 2763`); `gSavedSettings.getF32("ChatBubbleOpacity")` per tag (`llhudnametag.cpp:304`). - **Fix:** cache NV pointers; rebuild on events; compute position lazily. - Confirmed. S-M. 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
Author
Owner

Shipped in a published release and tested; closing (testing-lane sweep 2026-10-11).

Shipped in a published release and tested; closing (testing-lane sweep 2026-10-11).
sky_line 2026-10-11 13:24:56 +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#335
No description provided.