1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

buildtools: Don’t call normpath() repeatedly

A non‐negligible fraction of the build process — especially for
incremental builds — is spent calling normpath() over and over again.

Make builds faster by not doing that.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-10-13 11:23:27 +13:00 committed by Andrew Bartlett
parent bf79979f84
commit ec23abfe1f

View File

@ -710,8 +710,9 @@ def samba_before_apply_obj_vars(self):
"""before apply_obj_vars for uselib, this removes the standard paths""" """before apply_obj_vars for uselib, this removes the standard paths"""
def is_standard_libpath(env, path): def is_standard_libpath(env, path):
normalized_path = os.path.normpath(path)
for _path in env.STANDARD_LIBPATH: for _path in env.STANDARD_LIBPATH:
if _path == os.path.normpath(path): if _path == normalized_path:
return True return True
return False return False