perf(provider): lower dedicated daemon scheduling priority - #74
Draft
John-Ryan21337 wants to merge 1 commit into
Draft
John-Ryan21337 wants to merge 1 commit into
John-Ryan21337 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
The dedicated provider daemon lowers its own scheduling priority before it constructs provider runtimes. Normally launched children inherit that priority, so a large worker batch competes less with interactive desktop work. The change preserves an already lower launcher priority and continues startup if the OS rejects the request.
Why
Adopts Club Code's provider scheduling behavior at Cafe's current dedicated-daemon boundary. It changes only the current daemon process; no process-table scan or external PID mutation is needed. Electron, the backend, direct backend-hosted providers, the optional supervisor, and existing external runtimes keep their current policy. This does not cap memory, GPU use, network use, or worker count.
Closes #71. Base: Cafe
devat99fbaec89da429924171c89d66a8f3455e42d9b0.Validation: formatting, lint, typecheck, full unit test graph (10 workspaces), and a forced desktop build passed. Five mocked priority-boundary tests cover current-process targeting, preserving lower priority, and contained OS failures. An explicit two-process Node smoke verified inherited priority on Windows; it did not change the caller's priority. Generated
apps/server/dist/bin.mjscontains the startup boundary. Claude Opus 5 independently reviewed the exact source and passed its scoped audit at 2026-09-12T04:24:50Z; it did not claim to run tests.Checklist