Skip to content

fix: fix load of backgroundCompilerThreads setting#102

Merged
alandtse merged 5 commits into
community-shaders:devfrom
alandtse:adjustable_threads
Sep 24, 2023
Merged

fix: fix load of backgroundCompilerThreads setting#102
alandtse merged 5 commits into
community-shaders:devfrom
alandtse:adjustable_threads

Conversation

@alandtse

Copy link
Copy Markdown
Contributor

No description provided.

Compiler threads may be changed in the `Advanced->Compiler Threads`
menu. Defaults to the available cores - 1, but may be adjusted from 1 to
maximum cores. Compiler threads also have been changed to `background`
priority to prevent lock ups on start.
Switch to BS:thread_pool to abstract thread management and avoid
overhead of killing and starting threads. Instead, only add jobs to
pool when the number of active and queued threads is less than the
limit. The reason it's total and not just active is to avoid the case
where all tasks are dumped into the thread pool since the thread pool is
at the hardware maximum.

During compilation, one manager job is spawned to handle task
allocation and the remaining threads do the compilation work.
Users can now skip shader compilation before it is finished. Shader
compilation will continue using backgroundCompilationThread setting.
Users are also warned that this can result in visual errors or
stuttering while shaders are compiling.
@alandtse alandtse changed the title fix: fix load of backgrondCompilerThreads setting fix: fix load of backgroundCompilerThreads setting Sep 24, 2023
@alandtse alandtse merged commit 5646dfb into community-shaders:dev Sep 24, 2023
doodlum added a commit that referenced this pull request Sep 24, 2023
@alandtse alandtse deleted the adjustable_threads branch June 20, 2025 17:29
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request Jun 11, 2026
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant