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

Remove Stepping and Max ID Limit #33

Closed kevinfodness closed 1 month ago

kevinfodness commented 1 month ago

Summary

Removes the stepping property and no longer sets a max ID to constrain the query. Should result in a speedup in execution time because posts_per_page posts will be fetched on every query execution rather than running queries that return few or no results.

Note to Reviewer

The changes to the autoload parameter in the option function and tests are due to changes in WordPress 6.6 that were causing PHPStan and PHPUnit to fail due to a change in the expected type of the parameter and the value in the options table.

Fixes #30

srtfisher commented 1 month ago

Some timings as I process ~200 posts in a database of 500K: