diff options
author | Ross Burton <ross.burton@arm.com> | 2024-10-10 17:06:22 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-11 12:17:03 +0100 |
commit | fe5cf7dc8113916389a1d9c8fe8050ce86f294af (patch) | |
tree | 1b6e479ae5dae1560b099a9ea5e62145f53e10ba /scripts/lib/scriptpath.py | |
parent | c812b378e055e56e731713e72f2b5b9481b2dfb2 (diff) | |
download | poky-fe5cf7dc8113916389a1d9c8fe8050ce86f294af.tar.gz |
insane: use oe.cachedpath.CachedPath instead of os.path
The insane QAPATHTESTs make many os.stat() calls, the majority of which
are redundant with caching as the initial sweep does a stat() on every
entry to determine if it is a file or a directory, and from then on each
test that does further stat()s is redundant as the tree doesn't change.
Switch os.stat() and friends (os.path.isfile(), etc) to use a common
oe.cachedpath.CachedPath() instance that is shared between all of the
functions, meaning only one stat is done.
In my test case of ltp:do_package_qa, this reduces the time taken from
44s to 37s.
(From OE-Core rev: cad3c889439fd6a007debd6f2f6578f4a1e16c9c)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/scriptpath.py')
0 files changed, 0 insertions, 0 deletions