LL perf (Core): Queued threads get a lambda per frame; pause/unpause is dead #375

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

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

Queued threads get a lambda per frame; pause/unpause is dead

  • Per-frame lambda: LLQueuedThread::updateQueue() posts a std::function per thread per frame to call an (usually empty) threadedUpdate() (llqueuedthread.cpp:144-162). That is a heap allocation, a mutex and a CV notify, waking idle workers.
  • Dead pause: checkPause() is effectively never reached under runUntilClose() (:500-527), so the background pause (llappviewer.cpp:1898-1902, 2034-2044) does nothing.
  • Fix: post only for overriding subclasses; delete the pause calls.
  • Confirmed. S.

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

From the LL-origin inefficiency audit (finding C7). File/line references are from commit 0229f8872c; re-locate them before working. **Queued threads get a lambda per frame; pause/unpause is dead** - **Per-frame lambda:** `LLQueuedThread::updateQueue()` posts a `std::function` per thread per frame to call an (usually empty) `threadedUpdate()` (`llqueuedthread.cpp:144-162`). That is a heap allocation, a mutex and a CV notify, waking idle workers. - **Dead pause:** `checkPause()` is effectively never reached under `runUntilClose()` (`:500-527`), so the background pause (`llappviewer.cpp:1898-1902, 2034-2044`) does nothing. - **Fix:** post only for overriding subclasses; delete the pause calls. - 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: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#375
No description provided.