Skip to content

Parallel jobs with make - #76

Merged
asgrim merged 4 commits into
php:mainfrom
asgrim:parallel-jobs-with-make
Oct 24, 2024
Merged

Parallel jobs with make#76
asgrim merged 4 commits into
php:mainfrom
asgrim:parallel-jobs-with-make

Conversation

@asgrim

Copy link
Copy Markdown
Contributor

Fixes#73

PIE will try three approaches to determine the number of cores (nproc --all, getconf __NPROCESSORS_ONLN, sysctl -n hw.ncpu), or you can override with -jN or --make-parallel-jobs=N when running with PIE.

Doesn't cover Windows; or maybe some uncommon systems without those above commands. Suggestions welcome.

@asgrimasgrim added the enhancement New feature or request label Oct 24, 2024
@asgrimasgrim added this to the 0.2.0 milestone Oct 24, 2024
@remicollet

Copy link
Copy Markdown
Member

LGTM :)

@remicollet

Copy link
Copy Markdown
Member

@asgrim see asgrim#2

I really think (especially in case of long build) user should be able to follow what happen

@asgrimasgrim mentioned this pull request Oct 24, 2024
@asgrim

Copy link
Copy Markdown
ContributorAuthor

@asgrim see asgrim#2

I really think (especially in case of long build) user should be able to follow what happen

Thanks - I made a new ticket #77 to handle separately 👍 good suggestion, thank you

@asgrimasgrim self-assigned this Oct 24, 2024
@asgrim
asgrim merged commit 27a5b97 into php:mainOct 24, 2024
*
* @return positive-int
*/
public static function determine(): int

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend https://github.com/theofidry/cpu-core-counter, its the code used in most tools which have parallelisation

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some great packages already used it : see https://packagist.org/packages/fidry/cpu-core-counter/dependents?order_by=downloads
And I hope (me too) to adapt some of my packages to add a parallelization feature

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use parallel build

4 participants

@asgrim@remicollet@llaville@theofidry