alleyinteractive / wp-bulk-task

A library to assist with running performant bulk tasks against WordPress database objects.
GNU General Public License v2.0
13 stars 0 forks source link

Make `PHP_CLI_Progress_Bar` run faster #14

Closed renatonascalves closed 6 months ago

renatonascalves commented 7 months ago

Description

If the dataset is small, PHP_CLI_Progress_Bar takes longer than actually fetching the posts and running the run callback.

I'm not sure yet why, but hopefully, the progress bar is as fast as possible. It does feel it is working too hard just to generate the progress bar, IMO.

Use Case

A CLI command run with a small dataset.

renatonascalves commented 6 months ago

After a close look, decreasing the interval to everybody might not be ideal here. Better to leave it to the implementer to decide if it makes sense.

Besides, the "issue" has more to do with the framework we are using, https://github.com/wp-cli/php-cli-tools, rather than something we are doing.