LL perf (Objects/world): Full updates re-fire every extra-parameter handler, with no equality check #310

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

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

Full updates re-fire every extra-parameter handler, with no equality check

  • Where: unpackParameterEntry (llviewerobject.cpp:6606-6620, re-read) always unpacks and calls parameterChanged(...). Only setParameterEntry (:6735-6752) compares.
  • Wrong comment: setRenderMaterialIDs (:7808-7820) claims "extra params are checked for equality on unpacking". That is false on the network path.
  • Cost per full update of a PBR object (which includes every object created from cache):
    • per TE: setGLTFRenderMaterial(nullptr), which can flicker override materials until onMaterialComplete
    • gGLTFMaterialList.getMaterial plus std::function allocations
    • rebuildMaterial, setObjectCostStale
    • light/probe re-checks, and updateReflectionProbePtr pushing duplicate entries
  • Also: unused params get parameterChanged(false) on every full update (:1587-1594).
  • Fix: unpack into scratch, compare with current data plus in_use, fire only on change.
  • Confirmed. M, risk medium (something may rely on the refire).

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

From the LL-origin inefficiency audit (finding O2). File/line references are from commit 0229f8872c; re-locate them before working. **Full updates re-fire every extra-parameter handler, with no equality check** - **Where:** `unpackParameterEntry` (`llviewerobject.cpp:6606-6620`, re-read) always unpacks and calls `parameterChanged(...)`. Only `setParameterEntry` (`:6735-6752`) compares. - **Wrong comment:** `setRenderMaterialIDs` (`:7808-7820`) claims "extra params are checked for equality on unpacking". That is false on the network path. - **Cost per full update of a PBR object** (which includes every object created from cache): - per TE: `setGLTFRenderMaterial(nullptr)`, which can flicker override materials until `onMaterialComplete` - `gGLTFMaterialList.getMaterial` plus `std::function` allocations - `rebuildMaterial`, `setObjectCostStale` - light/probe re-checks, and `updateReflectionProbePtr` pushing duplicate entries - **Also:** unused params get `parameterChanged(false)` on every full update (`:1587-1594`). - **Fix:** unpack into scratch, compare with current data plus `in_use`, fire only on change. - Confirmed. M, risk medium (something may rely on the refire). 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#310
No description provided.