Avoid repeated realpath graph traversal
This commit is contained in:
@@ -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;
|
SharedUnit su;
|
||||||
setup_unit_paths(context, &su, file_name);
|
setup_unit_paths(context, &su, file_name);
|
||||||
auto state = inspect_shared_unit_filesystem(context, &su, allow_recent_source_stat);
|
auto state = inspect_shared_unit_filesystem(context, &su, allow_recent_source_stat);
|
||||||
|
|||||||
Reference in New Issue
Block a user