Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel jobs with make #76

Merged
merged 4 commits into from
Oct 24, 2024
Merged

Parallel jobs with make #76

merged 4 commits into from
Oct 24, 2024

Conversation

asgrim
Copy link
Collaborator

@asgrim asgrim commented Oct 24, 2024

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.

@asgrim asgrim added the enhancement New feature or request label Oct 24, 2024
@asgrim asgrim added this to the 0.2.0 milestone Oct 24, 2024
@remicollet
Copy link
Member

LGTM :)

@remicollet
Copy link
Member

@asgrim see asgrim#2

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

@asgrim
Copy link
Collaborator Author

asgrim commented Oct 24, 2024

@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

@asgrim asgrim self-assigned this Oct 24, 2024
@asgrim asgrim merged commit 27a5b97 into php:main Oct 24, 2024
19 checks passed
*
* @return positive-int
*/
public static function determine(): int
Copy link
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

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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use parallel build
4 participants