summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-15 16:57:47 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-16 11:19:02 +0100
commit2718537b4b04eb3d80ab4d74171b58e7b8dd68b8 (patch)
tree063558b2a40f6fc7e1ee83ca7e5273d7be58e819 /bitbake
parente2d023ff5fbf6c11e7edeb1d5f27d9c6fb307cc5 (diff)
downloadpoky-2718537b4b04eb3d80ab4d74171b58e7b8dd68b8.tar.gz
bitbake: build.py: Only execute mkdirhier if stampdir doesn't exist
I noticed this was showing up on profile logs as a sigificant time user in "bitbake bash" when bash was already built. It reduces the time from 5.2 to 4.5 seconds in my test environment. We make use of the parser's mtime cache as once a directory exists, we can assume it continues to exist and this avoids syscalls. (Bitbake rev: 769b694eeb617bb793bd79d0d7b29c43d2646ece) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/build.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index bea2926085..d64077ea96 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -464,7 +464,9 @@ def stamp_internal(taskname, d, file_name):
464 464
465 stamp = bb.parse.siggen.stampfile(stamp, file_name, taskname, extrainfo) 465 stamp = bb.parse.siggen.stampfile(stamp, file_name, taskname, extrainfo)
466 466
467 bb.utils.mkdirhier(os.path.dirname(stamp)) 467 stampdir = os.path.dirname(stamp)
468 if bb.parse.cached_mtime_noerror == 0:
469 bb.utils.mkdirhier(stampdir)
468 470
469 return stamp 471 return stamp
470 472