Performance Improvement – Not fixed price
-
Hey!
With version 2.2.3 (Free Version) I was having on a website load times of 8 to 12 seconds for the categories page with product with a lot of variations.
I actually ended up pinpointing the performance bottleneck on the following function: get_woocommerce_variation_prices from the prices.php file. I’m not using fixed prices, but nonetheless this line:
$wc_variation_product = wc_get_product( $key );
Is running before the if ( $fixed_price ) although the variable is only used if $fixed_price = true which in my case, was not. Just moving this variable definition to inside the if block when $fixed_price = true reduced my load times from 8/12 seconds to 1/2 seconds, fixing my problem.
Do you think it would be possible to implement this on a next version? That would be awesome. Let me know if I can help with anything.
- You must be logged in to reply to this topic.