* [PATCH] build.py: Only execute mkdirhier if stampdir doesn't exist
@ 2012-08-15 15:57 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2012-08-15 15:57 UTC (permalink / raw)
To: bitbake-devel
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-15 16:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-15 15:57 [PATCH] build.py: Only execute mkdirhier if stampdir doesn't exist Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox