Skip to content

feat: allow adjustment of compiler threads#99

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

feat: allow adjustment of compiler threads#99
doodlum merged 2 commits into
community-shaders:devfrom
alandtse:adjustable_threads

Conversation

@alandtse

Copy link
Copy Markdown
Contributor

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.

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.
@alandtse alandtse marked this pull request as draft September 22, 2023 07:46
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.
@alandtse alandtse marked this pull request as ready for review September 24, 2023 00:35
@alandtse alandtse requested a review from doodlum September 24, 2023 00:35
@doodlum doodlum merged commit 07d50a4 into community-shaders:dev Sep 24, 2023
alandtse added a commit that referenced this pull request Sep 24, 2023
alandtse added a commit that referenced this pull request Sep 24, 2023
revert: "feat: allow adjustment of compiler threads (#99)"
doodlum pushed a commit that referenced this pull request Sep 24, 2023
* feat: allow adjustment of compiler threads

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.

* fix: fix ctd when terminating compiler threads

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.
doodlum pushed a commit that referenced this pull request Sep 24, 2023
doodlum added a commit that referenced this pull request Sep 24, 2023
doodlum added a commit that referenced this pull request Sep 24, 2023
alandtse referenced this pull request in alandtse/open-shaders Jul 20, 2025
* feat: allow adjustment of compiler threads

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.

* fix: fix ctd when terminating compiler threads

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.
alandtse referenced this pull request in alandtse/open-shaders Jul 20, 2025
alandtse referenced this pull request in alandtse/open-shaders Jul 20, 2025
revert: "feat: allow adjustment of compiler threads (#99)"
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.

2 participants