From 6698dc64398571c2b35b5bb31f188183d413bbb6 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Thu, 24 Sep 2026 13:42:29 +0200 Subject: [PATCH] perf(decision): stop re-parsing the full task graph The decision task rebuilt Task objects for the whole full task graph from its JSON representation, only to check that TaskGraph.from_json works. This is already covered by the TaskGraph tests, and costs time proportional to the size of the full task graph on every decision task. --- src/taskgraph/decision.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/taskgraph/decision.py b/src/taskgraph/decision.py index a27eda672..7d927ecd8 100644 --- a/src/taskgraph/decision.py +++ b/src/taskgraph/decision.py @@ -17,7 +17,6 @@ from taskgraph.create import create_tasks from taskgraph.generator import TaskGraphGenerator from taskgraph.parameters import Parameters, get_version -from taskgraph.taskgraph import TaskGraph from taskgraph.util import json from taskgraph.util.python_path import find_object from taskgraph.util.schema import Schema, validate_schema @@ -131,9 +130,6 @@ def taskgraph_decision(options, parameters=None): "runnable-jobs.json", full_task_graph_to_runnable_tasks(full_task_json) ) - # this is just a test to check whether the from_json() function is working - _, _ = TaskGraph.from_json(full_task_json) - # write out the target task set to allow reproducing this as input write_artifact("target-tasks.json", list(tgg.target_task_set.tasks.keys()))