perl: use parallel build where possible
PATCH 1/1 perl: use parallel build where possible
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.
--- meta/recipes-devtools/perl/perl_5.24.1.bb | 5 +++++ 1 file changed, 5 insertions(+)
meta/recipes-devtools/perl/perl_5.24.1.bb +5 -0
@@ -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}" }
Signature · 1 line
2.15.1
Quoted 11 lines · Alexander Kanavin
While the upstream just runs a number of make tasks hardcoded to a single thread
in succession, we can add '-jn_threads' to a few of them. The benefit
is real: on my machine thedo_compile()time goes from 250 seconds to about 90.Signed-off-by Alexander Kanavin <[email protected]>---
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
Quoted 8 lines · Richard Purdie
Quoted 7 lines · Alexander Kanavin
While the upstream just runs a number of make tasks hardcoded to a single thread
in succession, we can add '-jn_threads' to a few of them. The benefit
is real: on my machine thedo_compile()time goes from 250 seconds to about 90.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Alexander Kanavin <[email protected]>--- 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