aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-06-21 14:44:09 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2019-06-24 22:26:58 +0300
commitf39d2cc3bfa1dd4983cbe5adfb6c6e87dd09d684 (patch)
treeac2b4d7d2d10103676aa63fe43d98786392b7635 /mesonbuild/backend
parent59e5ad66f2017e17692d64e2aa7d745ea3fe849d (diff)
downloadmeson-f39d2cc3bfa1dd4983cbe5adfb6c6e87dd09d684.zip
meson-f39d2cc3bfa1dd4983cbe5adfb6c6e87dd09d684.tar.gz
meson-f39d2cc3bfa1dd4983cbe5adfb6c6e87dd09d684.tar.bz2
meson: add cache for getting options
calling this function too ~60 sec. before, now 0.000435 sec.
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/backends.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 5e71933..3c18b14 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -226,6 +226,7 @@ class Backend:
return None
raise AssertionError('BUG: Tried to link to {!r} which is not linkable'.format(target))
+ @lru_cache(maxsize=None)
def get_target_dir(self, target):
if self.environment.coredata.get_builtin_option('layout') == 'mirror':
dirname = target.get_subdir()