From 1c78ea4f225aeb0ad59e6a1d7cc6b5f7521e3137 Mon Sep 17 00:00:00 2001 From: udo Date: Fri, 17 Jul 2026 22:59:42 +0000 Subject: [PATCH] Avoid repeated realpath graph traversal --- src/lib/compiler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/compiler.cpp b/src/lib/compiler.cpp index f5e2e38..648bf22 100644 --- a/src/lib/compiler.cpp +++ b/src/lib/compiler.cpp @@ -1350,9 +1350,10 @@ void compiler_untrack_known_unit(Request* context, String file_name) }); } -bool compiler_unit_needs_recompile(Request* context, String file_name, bool* source_missing, bool allow_recent_source_stat) +bool compiler_unit_needs_recompile(Request* context, String file_name, bool* source_missing, bool allow_recent_source_stat, bool path_is_normalized) { - file_name = compiler_normalize_unit_path(context, file_name); + if(!path_is_normalized) + file_name = compiler_normalize_unit_path(context, file_name); SharedUnit su; setup_unit_paths(context, &su, file_name); auto state = inspect_shared_unit_filesystem(context, &su, allow_recent_source_stat);