Avoid the extra PHP process in the wp launcher
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
Research direction
Start by reading bin/wp in wp-cli/wp-cli to locate the php -r "echo PHP_OS;" call used for Cygwin detection. Devise a shell-based check to avoid the extra PHP process. Done means wp launches with one PHP call and the CI timings recorded here show speed-up versus the #384 baseline.
Written by the indexing model from the issue text.
Description
The wp launcher script starts PHP twice for every command: once to run php -r "echo PHP_OS;", which is only needed to detect Cygwin, and once to run WP-CLI itself. Together with the shell wrappers this adds about 30 ms to every call (121 ms versus 92 ms for wp cli version locally).
The test suites make well over 10,000 wp calls per run of the bundled commands, so this adds up to several minutes for each CI configuration. It also slows down every real-world invocation.
The fix belongs in bin/wp in wp-cli/wp-cli. It is tracked here because the test suite is where the impact is largest.
Measuring: take the baseline from #384, then open a draft PR, run the same CI jobs against it and record both results here before we decide.
- Dominant language
- PHP
- Stars
- 42
- Forks
- 28
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wp-cli/wp-cli-tests
-
scope:testing
Difficulty 5/5 Over a week Newbie friendliness 20/100
wp-cli/wp-cli-tests#395 ·
Maintainers usually reply within 1 day
-
scope:testing
Difficulty 4/5 3-5 days Newbie friendliness 30/100
wp-cli/wp-cli-tests#394 ·
Maintainers usually reply within 1 day
-
bug scope:testing
Difficulty 4/5 3-5 days Newbie friendliness 45/100
wp-cli/wp-cli-tests#393 ·
Maintainers usually reply within 1 day
-
scope:testing
Difficulty 3/5 1-2 days Newbie friendliness 70/100
wp-cli/wp-cli-tests#392 ·
Maintainers usually reply within 1 day
-
scope:testing status:unconfirmed
Difficulty 4/5 3-5 days Newbie friendliness 45/100
wp-cli/wp-cli-tests#391 · 1 comment ·
Maintainers usually reply within 1 day
All issues in wp-cli/wp-cli-tests
Similar issues
-
repo:cms
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
craftcms/cms#20235 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mautic/mautic#18022 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1061 ·
Maintainers usually reply within 1 day