diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-14 17:26:20 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-18 21:26:40 +0000 |
commit | add11fa1abfc51f1a793c84f02cd7d85d793fe14 (patch) | |
tree | e58176a867d272a57d91f61e2f954fc0249d007e /meta/classes/base.bbclass | |
parent | cec0102647e3f2c93de5125c1de2436b4b787bdd (diff) | |
download | poky-add11fa1abfc51f1a793c84f02cd7d85d793fe14.tar.gz |
package: Add cachedpath optimisation
Currently, various standard library operations like os.walk(),
os.path.isdir() and os.path.islink() each call stat or lstat which
involves a syscall into the kernel. There is no caching since they could
conceivably have changed on disk. The result is that for something like
the do_package task of the kernel we're spending over two minutes making
868,000 individual stat calls for 23,000 files. This is suboptimal.
This patch adds lib/oe/cachedpath.py which are a set of replacement
functions for these operations which use cached stat data rather than
hitting the kernel each time. It gives a nice performance improvement
halving the build time of the kernel do_package.
(From OE-Core rev: 556dee0c4d6d8a87c0cddbd2f60fe5917d009f18)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r-- | meta/classes/base.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 4ec1eda6bc..5fe9a84efe 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -10,7 +10,7 @@ inherit utility-tasks | |||
10 | inherit metadata_scm | 10 | inherit metadata_scm |
11 | inherit logging | 11 | inherit logging |
12 | 12 | ||
13 | OE_IMPORTS += "os sys time oe.path oe.utils oe.data oe.package oe.packagegroup oe.sstatesig oe.lsb" | 13 | OE_IMPORTS += "os sys time oe.path oe.utils oe.data oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath" |
14 | OE_IMPORTS[type] = "list" | 14 | OE_IMPORTS[type] = "list" |
15 | 15 | ||
16 | def oe_import(d): | 16 | def oe_import(d): |