Uh oh!
There was an error while loading. Please reload this page.
GH-48340: [R] respected MAKEFLAGS - #48341
Conversation
| } else { | ||
| # Extract -j value from existing MAKEFLAGS if present | ||
| j_match <- regmatches(makeflags, regexpr("-j\\s*([0-9]+)", makeflags, perl = TRUE)) | ||
| if (length(j_match) > 0) { | ||
| ncores <- as.integer(sub("-j\\s*", "", j_match, perl = TRUE)) | ||
| } |
There was a problem hiding this comment.
Alternatively, we could probably pass our MAKEFLAGS all the way down to
arrow/r/inst/build_arrow_static.sh
Line 112 in 2360a0c
N_JOBS bit.Though this is more regexful, it is slightly less passing of large(r) things around so I went this route.
nealrichardson
left a comment
There was a problem hiding this comment.
You've confirmed that this does the expected thing?
I have a hard time believing that this is the canonical way to figure out how many workers make will use--there's no way to query make for its config? But I guess this is fine?
jonkeane
commented
Dec 5, 2025
Yeah, the output to the line Interestingly — on my machine moving with the respecting versus without wasn't vastly different. Going from 2 to 12 it was on the order of a 2x faster. But that's probably not totally surprising given that there's other overhead going on.
Hmmm lemme see if I can find something. The stuff I've found so far would enable full parallelism. But if not, I agree this is fine for now. |
jonkeane
commented
Dec 8, 2025
I'm not finding anything besides full parallelism, and we need to keep our default limit for CRAN builders, so I'm going to merge this, but if we find a better way in the future, I'm all for making this (more) standard (c)make. |
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 0f51aba. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them. |
### Rationale for this change Respect the `MAKEFLAGS` that someone has set. Resolvesapache#48340 ### What changes are included in this PR? Respect ### Are these changes tested? No, though we should see speedups in various places. ### Are there any user-facing changes? More respect. * GitHub Issue: apache#48340
Rationale for this change
Respect the
MAKEFLAGSthat someone has set.Resolves#48340
What changes are included in this PR?
Respect
Are these changes tested?
No, though we should see speedups in various places.
Are there any user-facing changes?
More respect.
MAKEFLAGSis not being respected fully. #48340