Title: Speed problem
Last modified: June 13, 2024

---

# Speed problem

 *  Resolved [firepages](https://wordpress.org/support/users/firepages/)
 * (@firepages)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/spped-problem/)
 * Hi,
 * We have noticed quite a significant impact on speed in admin when displaying 
   either the products list page or the orders list page. This increases the page
   generation time from around 2s to around 4s and seems to be cuased by the following
   query:
 * SELECT p.ID FROM 1e_posts p, 1e_postmeta pm WHERE pm.post_id=p.ID AND p.post_type
   =s AND p.post_date>=date_sub(now(),interval 1 hour) AND p.post_modified>=date_sub(
   now(),interval 1 hour) GROUP BY p.ID
 * Traceback:
 * do_action(‘admin_init’), WP_Hook->do_action, WP_Hook->apply_filters, wc_slw_admin_init,
   slw_update_products
 * This is taking around 2.3s to execute.
 * We have arounf 10,000 products in 3 stock locations
 * Is there any way to improve this ?
 * Regards
   Simon Silver
    -  This topic was modified 1 year, 11 months ago by [firepages](https://wordpress.org/support/users/firepages/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * (@fahadmahmood)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/spped-problem/#post-17822848)
 * Dear Simon,
 * The other way to update the products in bulk is through cron job scripts, usually
   users do not feel comfortable using that option too. What do you suggest? And
   it is updating only 50 products in one round, after your report I have reduced
   it to half so only 25 products will be updated on each page refresh. Please let
   it be there.
    -  This reply was modified 1 year, 11 months ago by [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/).
 *  Thread Starter [firepages](https://wordpress.org/support/users/firepages/)
 * (@firepages)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/spped-problem/#post-17822951)
 * Hi Fahad,
 * Thansk for the reply – I guess that I had thought that the updates would be done
   for the specific stock items when an order is placed and not as a batch – is 
   there any reason why the stock can’t be updated as the order is placed ?
 * Regards
   Simon
 *  Plugin Author [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * (@fahadmahmood)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/spped-problem/#post-17823078)
 * its complex, multiple items in an order, some users are updating stock through
   cssv import, API endpoints, and some extra actions cannot be performed immediately
   after product import, update or order placed so a function was required to sum
   up everything before taking next move
 *  Thread Starter [firepages](https://wordpress.org/support/users/firepages/)
 * (@firepages)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/spped-problem/#post-17824720)
 * Hi Fahad,
 * OK – thanks for the explanation.
 * Regards
   Simon
 *  Plugin Author [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * (@fahadmahmood)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/spped-problem/#post-17824739)
 * but in the most recent release, I have made it dependeion Cron job scripts toggle,
   so if you are running Cron jobs , this one will be skipped, else it will update
   25 products per refresh

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Speed problem’ is closed to new replies.

 * ![](https://ps.w.org/stock-locations-for-woocommerce/assets/icon.svg?rev=2471943)
 * [Stock Locations for WooCommerce](https://wordpress.org/plugins/stock-locations-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/stock-locations-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/stock-locations-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/stock-locations-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stock-locations-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stock-locations-for-woocommerce/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/spped-problem/#post-17824739)
 * Status: resolved