woocommerce / wc-smooth-generator

Smooth product, customer and order generation for WooCommerce
309 stars 49 forks source link

Admin UI: Enable batch generation #121

Closed coreymckrill closed 4 months ago

coreymckrill commented 1 year ago

Currently when entering a number of products or orders to generate in the Admin UI, and then clicking the Generate button, a separate Action Scheduler task is created for each item that will be generated. This seems inefficient, and in some cases might even be causing the wrong number of things to be generated (I've observed that 20+ products have been generated when I requested 10, but I don't know what's causing it).

Instead, if the generator classes each had a batch method, like the one introduced in #117, a single AS task could be created for up to a certain number of items (10? 100?), resulting in fewer total tasks created, and possibly faster generation.