You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multisite scenarios often create their sites one at a time with wp site create before the actual test, for example in site.feature in entity-command, core-update-db.feature in core-command and cli-bash-completion.feature in wp-cli. Each site takes about 0.7 seconds to create, and this happens about 65 times per suite run.
A step that creates a list of sites at once, saving their IDs where needed, would make this setup cheaper and easier to read.
Measured in #407 against the test suites of 4 bundled commands, with three runs with and without the change each (see the pull request description for the numbers).
Only about 45 sites are created this way across the bundled commands, so the total Behat time changed by +1.9%, within the run-to-run variation. Creating the sites in a single process also broke three core update-db scenarios in core-command that first downgrade WordPress to 5.4, failing with Table 'wp_cli_test.wp_2_posts' doesn't exist, while separate wp site create calls work.
Closing, as there is no measurable gain and creating sites in a single process is not reliable.
Activity
schlessera commentedon Oct 31, 2026
Measured in #407 against the test suites of 4 bundled commands, with three runs with and without the change each (see the pull request description for the numbers).
Only about 45 sites are created this way across the bundled commands, so the total Behat time changed by +1.9%, within the run-to-run variation. Creating the sites in a single process also broke three
core update-dbscenarios in core-command that first downgrade WordPress to 5.4, failing withTable 'wp_cli_test.wp_2_posts' doesn't exist, while separatewp site createcalls work.Closing, as there is no measurable gain and creating sites in a single process is not reliable.