Feature #9579

[PATCH] ext/extmk.rb: parallelize configure

Added by Eric Wong 12 months ago. Updated 12 months ago.

[ruby-core:61142]
Status:Open
Priority:Normal
Assignee:Eric Wong

Description

This reduces "touch ext/extmk.rb && make -j" time from
roughly 38 to 16 seconds on my 8 core machine with
an otherwise fully-built source tree.

http://bogomips.org/ruby.git/patch?id=bc6acbaa40

git pull git://80x24.org/ruby.git extmk-parallel

History

#1 Updated by Nobuyoshi Nakada 12 months ago

Does it work with static-linked-ext or compiled? method?

#2 Updated by Eric Wong 12 months ago

nobu@ruby-lang.org wrote:

Does it work with static-linked-ext or compiled? method?

Oops, I'll see if I can fix those.

#3 Updated by Eric Wong 12 months ago

nobu@ruby-lang.org wrote:

Does it work with static-linked-ext or compiled? method?

OK, I should have both of them working with a lot of new code
and pushed out an addendum patch:

http://bogomips.org/ruby.git/patch?id=84ea2b48a
git://80x24.org/ruby.git extmk-parallel-v2

Even without these patches, I get a lot of
"warning: already initialized constant" warnings when running
`make check' and that seems to cause failures...

#4 Updated by Eric Wong 12 months ago

Trivial addendum for v3 (pushed earlier, but I lost my Internet
connection before I could email).
http://bogomips.org/ruby.git/patch?id=5779e6040
git://80x24.org/ruby.git extmk-parallel-v3

#5 Updated by Eric Wong 12 months ago

normalperson@yhbt.net wrote:

Trivial addendum for v3 (pushed earlier, but I lost my Internet
connection before I could email).
http://bogomips.org/ruby.git/patch?id=5779e6040
git://80x24.org/ruby.git extmk-parallel-v3

5779e60 ext/extmk.rb: uniq extlibs
195e511 ext/extmk.rb: fix for static-linked-ext and compiled? usage
3029a5e ext/extmk.rb: parallelize configure

I'll squash this series together and commit in a few days unless there's
objections/bugs found. It should help productivity for developers with
fork enabled systems and gracefully fallback for systems without fork.

#6 Updated by Nobuyoshi Nakada 12 months ago

EXT_DEPS doesn't look good to me.

#7 Updated by Eric Wong 12 months ago

Thanks for taking a look. I not sure what to do about EXT_DEPS.
The compiled? check is strange.

dl and tk will be gone soon, we can wait (or remove dl+tk sooner).
win32 cannot fork, so the special case there is not needed, even.

Also available in: Atom PDF