[OE-core] [PATCH 2/3] package.bbclass: use oe.path.realpath()

Richard Purdie richard.purdie at linuxfoundation.org
Wed Mar 6 11:49:17 UTC 2013


On Sun, 2013-02-10 at 13:41 +0100, Enrico Scholz wrote:
> oe.path.realpath() provides are common and more correct implementation
> for resolving symlinks within sysroot. Use it.
> 
> Old implementation suffered from lot of problems; e.g.
> 
> * redundant code
> 
> * calls 'os.stat()' which references files on host; this can give wrong
>   results about existing/non-existing and can cause EPERM (instead of
>   the catched ENONENT) exceptions
> 
> * does not deal with special cases like '..' leaving the sysroot.

Whilst these changes are good, they do come at a cost:

post symlink package changes
./perfscript -c 8c22531e491e6b0cfffaaa80d6bc75db757fc1d1
49:38.46,17:12.15

pre symlink package changes
./perfscript -c 1a80329b3fcf23ecc23e409a260b9b2182652f65
48:16.33,13:39.97

So it added 1m20 to the overall build time, but more worryingly, added
added nearly 3m30 to the time for:

bitbake virtual/kernel -c cleansstate; bitbake virtual/kernel

These tests are based on the script linked from
https://wiki.yoctoproject.org/wiki/Performance_Test where the kernel
test is this is the second number above list, overall build time is the
first.

Have you any time to look into this performance regression?

FWIW, "bitbake virtual/kernel -c package -P -f" shows that
package_fixsymlinks() takes a rather long time in the profile output.

Cheers,

Richard





More information about the Openembedded-core mailing list