From: Richard Purdie Date: Wed, 15 Aug 2012 15:57:47 +0000 (+0100) Subject: bitbake: build.py: Only execute mkdirhier if stampdir doesn't exist X-Git-Tag: rev_ivi_2015_02_04~16001 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4fe77f4a80778c9ff8cd4b8ad3f38c6d16a3947;p=scm%2Fbb%2Ftizen-distro.git 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 --- diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index bea2926..d64077e 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -464,7 +464,9 @@ def stamp_internal(taskname, d, file_name): stamp = bb.parse.siggen.stampfile(stamp, file_name, taskname, extrainfo) - bb.utils.mkdirhier(os.path.dirname(stamp)) + stampdir = os.path.dirname(stamp) + if bb.parse.cached_mtime_noerror == 0: + bb.utils.mkdirhier(stampdir) return stamp