Skip to content

perf(parameterization): speed up resolving task definition references - #1051

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

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

Conversation

@marco-c

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

Copy link
Copy Markdown
Contributor

_recurse walks every task definition when resolving task references during optimization, and again when resolving timestamps during task creation. For each single-key dictionary it iterated over all the parameter functions, building a set of the dictionary keys to compare against each of them. Now the key is looked up directly in the parameter functions. Dictionaries are also checked before lists, as they are much more common in task definitions.

On a typical task definition, resolve_task_references takes 14.5us instead of 18.3us, and resolve_timestamps 20.5us instead of 23.1us.

_recurse walks every task definition when resolving task references
during optimization, and again when resolving timestamps during task
creation. For each single-key dictionary it iterated over all the
parameter functions, building a set of the dictionary keys to compare
against each of them. Now the key is looked up directly in the
parameter functions. Dictionaries are also checked before lists, as
they are much more common in task definitions.

On a typical task definition, resolve_task_references takes 14.5us
instead of 18.3us, and resolve_timestamps 20.5us instead of 23.1us.
@marco-c
marco-c requested a review from a team as a code owner September 29, 2026 13:39
@marco-c
marco-c requested a review from ahal September 29, 2026 13:39

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