Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] perl: use parallel build where possible
@ 2018-03-02 15:32 Alexander Kanavin
  2018-03-03  8:53 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2018-03-02 15:32 UTC (permalink / raw)
  To: openembedded-core

While the upstream just runs a number of make tasks hardcoded to a single thread
in succession, we can add '-j n_threads' to a few of them. The benefit
is real: on my machine the do_compile() time goes from 250 seconds to about 90.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-devtools/perl/perl_5.24.1.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/perl/perl_5.24.1.bb b/meta/recipes-devtools/perl/perl_5.24.1.bb
index f13a63a80a3..67cc8d668db 100644
--- a/meta/recipes-devtools/perl/perl_5.24.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.24.1.bb
@@ -184,6 +184,11 @@ do_compile() {
         # Fix to avoid recursive substitution of path
         sed -i -e 's|(@libpath, ".*"|(@libpath, "${STAGING_LIBDIR}"|g' cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
 
+        # Build auxillary make targets (more/more2/more3/more4) in parallel.
+        # Unfortunately the core target will race, and so remains single-threaded.
+        # Still, this cuts do_compile() time from 250 seconds to about 90.
+        sed -i -e 's, more, ${PARALLEL_MAKE} more,g' Cross/Makefile
+
         cd Cross
         oe_runmake perl LD="${CCLD}"
 }
-- 
2.15.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perl: use parallel build where possible
  2018-03-02 15:32 [PATCH] perl: use parallel build where possible Alexander Kanavin
@ 2018-03-03  8:53 ` Richard Purdie
  2018-03-05 14:03   ` Alexander Kanavin
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2018-03-03  8:53 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On Fri, 2018-03-02 at 17:32 +0200, Alexander Kanavin wrote:
> While the upstream just runs a number of make tasks hardcoded to a
> single thread
> in succession, we can add '-j n_threads' to a few of them. The
> benefit
> is real: on my machine the do_compile() time goes from 250 seconds to
> about 90.
> 
> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
>  meta/recipes-devtools/perl/perl_5.24.1.bb | 5 +++++
>  1 file changed, 5 insertions(+)

I like the idea of the patch but I think it triggered:

https://autobuilder.yocto.io/builders/nightly-world/builds/806/steps/BuildImages/logs/stdio

Cheers,

Richard



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] perl: use parallel build where possible
  2018-03-03  8:53 ` Richard Purdie
@ 2018-03-05 14:03   ` Alexander Kanavin
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Kanavin @ 2018-03-05 14:03 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

On 03/03/2018 10:53 AM, Richard Purdie wrote:
> On Fri, 2018-03-02 at 17:32 +0200, Alexander Kanavin wrote:
>> While the upstream just runs a number of make tasks hardcoded to a
>> single thread
>> in succession, we can add '-j n_threads' to a few of them. The
>> benefit
>> is real: on my machine the do_compile() time goes from 250 seconds to
>> about 90.
>>
>> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
>> ---
>>   meta/recipes-devtools/perl/perl_5.24.1.bb | 5 +++++
>>   1 file changed, 5 insertions(+)
> 
> I like the idea of the patch but I think it triggered:
> 
> https://autobuilder.yocto.io/builders/nightly-world/builds/806/steps/BuildImages/logs/stdio

Unfortunately it's also a race:

| JSON::PP 2.27103 is not available
...
| Unsuccessful Makefile.PL(ext/ODBM_File): code=65280 at make_ext.pl 
line 521.
| makefile:590: recipe for target 'lib/auto/ODBM_File/ODBM_File.so' failed

Maybe we should look into reducing perl dependencies instead, 
particularly look into whether perl is really still needed for RDEPENDS 
of various ptests of 'core' packages.

Alex


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-05 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-02 15:32 [PATCH] perl: use parallel build where possible Alexander Kanavin
2018-03-03  8:53 ` Richard Purdie
2018-03-05 14:03   ` Alexander Kanavin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox