mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +00:00
fddf21b8de
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. |
||
---|---|---|
.. | ||
encoders | ||
ffmpeg | ||
filters | ||
gfx | ||
nvidia | ||
obs | ||
sources | ||
transitions | ||
ui | ||
util | ||
common.hpp | ||
configuration.cpp | ||
configuration.hpp | ||
plugin.cpp | ||
plugin.hpp | ||
strings.hpp | ||
updater.cpp | ||
updater.hpp | ||
warning-disable.hpp | ||
warning-enable.hpp | ||
windll.cpp |