From 9e40a0125c3bd558fbd29da8715d334d787c1a4d Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sun, 1 Mar 2020 17:21:56 +0100 Subject: meson: cache the results of can_compile the check for which files can be compiled are called again and again on the same files over and over again. Caching this here shaves off 11s of the build time of efl (which has grown in the last 3 versions to over 40 sec. again) --- mesonbuild/compilers/compilers.py | 1 + 1 file changed, 1 insertion(+) (limited to 'mesonbuild/compilers/compilers.py') diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 2a29716..1c0adff 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -731,6 +731,7 @@ class Compiler: return repr_str.format(self.__class__.__name__, self.version, ' '.join(self.exelist)) + @lru_cache(maxsize=None) def can_compile(self, src) -> bool: if hasattr(src, 'fname'): src = src.fname -- cgit v1.1