summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/cachedpath.py
Commit message (Collapse)AuthorAgeFilesLines
* cachedpath.py: global name 'error' is not definedRobert Yang2013-05-151-3/+1
| | | | | | | | | | | | The error is not global since we don't use "from os import *", so it should be os.error. [YOCTO #4489] (From OE-Core rev: ac0e2781c2723257bd380cac170d4c8b97e36747) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* clases/lib: Use modern exception syntaxRichard Purdie2013-05-091-2/+2
| | | | | | | | | Update older code to use modern exception handling syntax which is the form accepted by python 3. (From OE-Core rev: b010501cd089e649a68f683be0cf4d0aac90fbe3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Add cachedpath optimisationRichard Purdie2013-03-181-0/+235
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>