From d58620bcf328a500b964fd9190f712c96d6a136e Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Fri, 22 Mar 2024 17:35:17 +0100 Subject: Absent target: deduplicate serve calls asking for flexible variables For an absent export target, the first step of analysis is to ask serve for the flexible variables. The answer to this request is, however, independent of the configuration for this target. So we can avoid calls by caching the answer in an additional map. --- src/buildtool/main/analyse.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/buildtool/main/analyse.cpp') diff --git a/src/buildtool/main/analyse.cpp b/src/buildtool/main/analyse.cpp index 6f63e7ab..ab2313e7 100644 --- a/src/buildtool/main/analyse.cpp +++ b/src/buildtool/main/analyse.cpp @@ -116,8 +116,15 @@ namespace Target = BuildMaps::Target; Base::CreateRuleMap(&rule_file_map, &expr_map, repo_config, jobs); auto source_targets = Base::CreateSourceTargetMap(&directory_entries, repo_config, jobs); - auto absent_target_map = Target::CreateAbsentTargetMap( - result_map, repo_config, stats, &exports_progress, jobs); + auto absent_target_variables_map = + Target::CreateAbsentTargetVariablesMap(jobs); + auto absent_target_map = + Target::CreateAbsentTargetMap(result_map, + &absent_target_variables_map, + repo_config, + stats, + &exports_progress, + jobs); auto target_map = Target::CreateTargetMap(&source_targets, &targets_file_map, &rule_map, -- cgit v1.2.3