LL perf (Objects/world): getPositionAgent/getPositionGlobal/updatePositionCaches do a std::list find per call #320

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

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

getPositionAgent/getPositionGlobal/updatePositionCaches do a std::list find per call

  • Where: LLWorld::isRegionListed (llworld.cpp:2265-2269), called at llviewerobject.cpp:4468, 4485, 4505. 164 call sites.
  • Region lookups: getRegion(host), getRegionFromHandle and getRegionFromID are linear as well (llworld.cpp:317-446).
  • Fix: region generation/dead flag; hash indexes.
  • Confirmed. S. Moderate impact.

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

From the LL-origin inefficiency audit (finding O14). File/line references are from commit 0229f8872c; re-locate them before working. **`getPositionAgent`/`getPositionGlobal`/`updatePositionCaches` do a `std::list` find per call** - **Where:** `LLWorld::isRegionListed` (`llworld.cpp:2265-2269`), called at `llviewerobject.cpp:4468, 4485, 4505`. 164 call sites. - **Region lookups:** `getRegion(host)`, `getRegionFromHandle` and `getRegionFromID` are linear as well (`llworld.cpp:317-446`). - **Fix:** region generation/dead flag; hash indexes. - Confirmed. S. Moderate impact. 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#320
No description provided.