Repository navigation
Conversation
Running a trivial task across 1000 workspaces took 16-20s. The coordinator spent most of that rescanning every resolved task (and allocating keys for each prerequisite) after every command, including each output line. - Scheduling passes iterate prepared tasks once, compute the satisfied and failed sets once, and look prerequisites up by borrowed keys. - The failure scan is skipped when nothing failed. - Commands that can't change task states (output lines, queries, subscriptions) don't trigger a pass. - Standalone daemons don't register taskfile watchers. 1000 tasks now take ~1-2s.
arcanis
force-pushed
the
mael/tasks-persistent-dev
branch
from
October 9, 2026 13:59
55deb1c to
86a2038
Compare
arcanis
force-pushed
the
mael/daemon-scheduling-perf
branch
from
October 9, 2026 13:59
02b4450 to
e5b5e7f
Compare
This branch has not been deployed
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.
Issue: a trivial task across 1000 workspaces took 16-20s. After every command, including each output line, the coordinator rescanned every task and allocated keys for each prerequisite check.
Fix:
1000 tasks now take ~1-2s. Stacked on #376.
Note
Medium Risk
Scheduling and prerequisite propagation logic changed on the critical coordinator path; incorrect skips or set membership could delay spawns or miss failure propagation, though behavior should be equivalent if the command classification is complete.
Overview
Improves daemon performance for large monorepos by cutting redundant scheduling and expensive startup work.
The coordinator skips
drain_ready_tasksafter read-only commands (notablyTaskOutputand other subscription/query/file-watch paths) so high-volume output no longer triggers full graph scans.find_ready_tasks/find_tasks_to_failare rewritten to build satisfied/failed sets once per pass and check prerequisites with borrowed keys instead of allocating aContextualTaskIdper edge; failure propagation returns immediately when nothing failed.Inline (standalone) daemons detect
port_txand disable taskfile hot-reload watching (TaskfileWatcher::set_enabled(false)), avoiding O(workspaces) FSEvents registration that was dominating startup.Reviewed by Cursor Bugbot for commit e5b5e7f. Bugbot is set up for automated code reviews on this repo. Configure here.