Skip to content

Conversation

@glandium
Copy link
Contributor

@glandium glandium commented Jan 9, 2025

… anyways

The most expensive call at the moment is repo.get_changed_files, which does down the drain if:

  • another default_fn overrides the value
  • an explicit override is given when creating the Parameters

With this change, the default function can return a function as a value, which is not evaluated unless necessary.

Fixes #616

@glandium glandium marked this pull request as draft January 9, 2025 07:05
@glandium glandium marked this pull request as ready for review January 9, 2025 07:24
@jcristau jcristau requested a review from ahal January 9, 2025 09:35
… anyways

The most expensive call at the moment is repo.get_changed_files, which
does down the drain if:
- another default_fn overrides the value
- an explicit override is given when creating the `Parameters`

With this change, the default function can return a function as a value,
which is not evaluated unless necessary.

Fixes taskcluster#616
@ahal ahal merged commit 588dc4f into taskcluster:main Jan 9, 2025
13 checks passed
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 18, 2025
…ing. r=taskgraph-reviewers,jcristau

Loading the tasks for the toolchain kind doesn't trigger the
optimization passes that use files_changed, so we can just override the
parameter to avoid the defaults expensively trying to determine what
they are.

We also change the default parameters in gecko_taskgraph to apply the
same change as taskcluster/taskgraph#624.

Differential Revision: https://phabricator.services.mozilla.com/D234628
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Jan 24, 2025
…ing. r=taskgraph-reviewers,jcristau

Loading the tasks for the toolchain kind doesn't trigger the
optimization passes that use files_changed, so we can just override the
parameter to avoid the defaults expensively trying to determine what
they are.

We also change the default parameters in gecko_taskgraph to apply the
same change as taskcluster/taskgraph#624.

Differential Revision: https://phabricator.services.mozilla.com/D234628
jwidar pushed a commit to jwidar/LatencyZeroGithub that referenced this pull request Sep 16, 2025
…ing. r=taskgraph-reviewers,jcristau

Loading the tasks for the toolchain kind doesn't trigger the
optimization passes that use files_changed, so we can just override the
parameter to avoid the defaults expensively trying to determine what
they are.

We also change the default parameters in gecko_taskgraph to apply the
same change as taskcluster/taskgraph#624.

Differential Revision: https://phabricator.services.mozilla.com/D234628
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.

Filling default Parameters should avoid expensive operations

3 participants