From f8e7b103299eefd67849eb7b5b73865e9647cf8d Mon Sep 17 00:00:00 2001 From: Geoffroy Couprie Date: Thu, 7 Dec 2023 12:21:36 +0100 Subject: [PATCH] reduce the number of pruning operations Instead of checking a path against the entire list of paths every time, we only check against the list of already accepted paths. --- query-planner-js/src/buildPlan.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query-planner-js/src/buildPlan.ts b/query-planner-js/src/buildPlan.ts index e31a81754..46c75de2b 100644 --- a/query-planner-js/src/buildPlan.ts +++ b/query-planner-js/src/buildPlan.ts @@ -610,7 +610,7 @@ class QueryPlanningTraversal { const pruned: ClosedBranch = []; for (const toCheck of branch) { - if (!this.optionIsOverriden(toCheck.paths, branch)) { + if (!this.optionIsOverriden(toCheck.paths, pruned)) { pruned.push(toCheck); } }