[oe] [meta-java][PATCH 2/9] openjdk-8: speed-up do_install() (pack200)

André Draszik git at andred.net
Mon Aug 13 10:09:29 UTC 2018


From: André Draszik <andre.draszik at jci.com>

We run pack200 sequentially on all found archives, but there
doesn't seem to be a reason to do so, the
java_get_parallel_make() apperas to be related to compiling
java itself, running multiple java applications (pack200)
at the same time on the same machine should be possible,
otherwise we have a big problem...

Just run up to BB_NUMBER_THREADS pack200 processes at the same
time to speed up the build.

Signed-off-by: André Draszik <andre.draszik at jci.com>
---
 recipes-core/openjdk/openjdk-8-cross.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc
index 03cab11..d0b2ec8 100644
--- a/recipes-core/openjdk/openjdk-8-cross.inc
+++ b/recipes-core/openjdk/openjdk-8-cross.inc
@@ -77,13 +77,13 @@ do_install_append() {
     if ${@bb.utils.contains('PACKAGECONFIG', 'repack', 'true', 'false', d)} ; then
       if [ -d ${D}${JDK_HOME} ] ; then
         find ${D}${JDK_HOME} -name "*.jar" -print0 | \
-          xargs -0 -n1 -P ${@java_get_parallel_make(d)} sh -c ' \
+          xargs -0 -n1 -P ${BB_NUMBER_THREADS} sh -c ' \
               echo "Repacking" "$0" ; \
               pack200 --repack --effort=9 --segment-limit=-1 --modification-time=latest --strip-debug "$0"'
       fi
       if [ -d ${D}${JRE_HOME} ] ; then
         find ${D}${JRE_HOME} -name "*.jar" -print0 | \
-          xargs -0 -n1 -P ${@java_get_parallel_make(d)} sh -c ' \
+          xargs -0 -n1 -P ${BB_NUMBER_THREADS} sh -c ' \
               echo "Repacking" "$0" ; \
               pack200 --repack --effort=9 --segment-limit=-1 --modification-time=latest --strip-debug "$0"'
       fi
-- 
2.18.0




More information about the Openembedded-devel mailing list