obs-StreamFX/source/util
Michael Fabian 'Xaymar' Dirks fddf21b8de util/threadpool: Optimize for dynamic thread pooling
While the previous approach of a static thread pool worked, it was sub-optimal in its resource usage. Many of the threads would never see a single task, and simply permanently sleep. This seems like a good idea, except that sleeping threads still end up in the scheduler, and thus waste a tiny amount of resources.

It is better to instead dynamically spawn threads when needed and only keeping the bare minimum around all the time. These dynamically spawned threads are also explicitly set to background priority which further reduces scheduling overhead. Finally optimizing the memory layout to prevent unwanted false sharing should also keep sporadic wake ups at a minimum.

This new model should be able to handle many more tasks than ever before, but is still not as optimal as it could be.
2023-04-05 18:58:49 +02:00
..
util-bitmask.hpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
util-curl.cpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
util-curl.hpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
util-event.hpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
util-library.cpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
util-library.hpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
util-logging.cpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
util-logging.hpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
util-math.hpp project: Code cleanup and reapply formatting 2023-03-28 12:52:20 +02:00
util-memory.cpp project: Code cleanup and reapply formatting 2023-03-28 12:52:20 +02:00
util-platform.cpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
util-platform.hpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
util-profiler.cpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
util-profiler.hpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
util-threadpool.cpp util/threadpool: Optimize for dynamic thread pooling 2023-04-05 18:58:49 +02:00
util-threadpool.hpp util/threadpool: Optimize for dynamic thread pooling 2023-04-05 18:58:49 +02:00
utility.cpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
utility.hpp cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00