summaryrefslogtreecommitdiff
path: root/indra/llcommon/CMakeLists.txt
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-08-06 15:55:58 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-08-06 15:55:58 -0400
commitd3b1859ca3d6c2c2bcc92edba994b522cf9d4e99 (patch)
tree41138b895710f601ba58c89fbb9349e0293ae0a9 /indra/llcommon/CMakeLists.txt
parentd6abce3968925c5cb58c11f1c6fc936605f55c57 (diff)
Introduce a custom coroutine/fiber scheduler to prioritize UI.
The viewer's main thread's main fiber is responsible for coordinating just about everything. With the default round_robin fiber scheduling algorithm, launching too many additional fibers could starve the main fiber, resulting in visible lag. This custom scheduler tracks when it switches to and from the main fiber, and at each context switch, how long it's been since the last time the main fiber ran. If that exceeds a certain timeslice, it jumps the main fiber to the head of the queue and resumes that instead of any other ready fiber.
Diffstat (limited to 'indra/llcommon/CMakeLists.txt')
-rw-r--r--indra/llcommon/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 20670d7ebe..221fc2bb3f 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -18,6 +18,7 @@ include(Tracy)
set(llcommon_SOURCE_FILES
apply.cpp
commoncontrol.cpp
+ coro_scheduler.cpp
hbxxh.cpp
indra_constants.cpp
lazyeventapi.cpp
@@ -125,6 +126,7 @@ set(llcommon_HEADER_FILES
chrono.h
classic_callback.h
commoncontrol.h
+ coro_scheduler.h
ctype_workaround.h
fix_macros.h
fsyspath.h