Skip to content

perf(generator): look up kind dependency tasks by kind - #1054

Open
marco-c wants to merge 1 commit into
taskcluster:mainfrom
marco-c:group_deps
Open

marco-c wants to merge 1 commit into
taskcluster:mainfrom
marco-c:group_deps

Conversation

@marco-c

@marco-c marco-c commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Before loading a kind, the generator filtered all the tasks loaded so far to find the ones belonging to the kind's dependencies (copying them first when loading kinds in parallel). This is proportional to the number of kinds times the number of tasks, and in parallel mode it happens on the main thread, delaying the submission of newly unblocked kinds.

Now loaded tasks are also grouped by kind, so the tasks of each kind dependency are looked up directly. They are still passed in the order in which kinds were loaded.

With 150 kinds of 270 tasks each (40,500 tasks), each depending on three other kinds, gathering the kind dependency tasks takes 0.01s in total instead of 0.42s.

Before loading a kind, the generator filtered all the tasks loaded so
far to find the ones belonging to the kind's dependencies (copying them
first when loading kinds in parallel). This is proportional to the
number of kinds times the number of tasks, and in parallel mode it
happens on the main thread, delaying the submission of newly unblocked
kinds.

Now loaded tasks are also grouped by kind, so the tasks of each kind
dependency are looked up directly. They are still passed in the order in
which kinds were loaded.

With 150 kinds of 270 tasks each (40,500 tasks), each depending on three
other kinds, gathering the kind dependency tasks takes 0.01s in total
instead of 0.42s.
@marco-c
marco-c requested a review from a team as a code owner September 29, 2026 13:46
@marco-c
marco-c requested a review from bhearsum September 29, 2026 13:46

This branch has not been deployed

No deployments
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