Search

WordPress AI Recommendations
- SEO, conversions -

Table of contents :

Why DIVI load time is 15 seconds on a shop with 100K products

DIVI with 100K products load time 15 seconds

Table of contents :

The problem

DIVI is one of the themes for which we have built a demo to showcase our WooCommerce search plugin.

But DIVI is also the only theme, or page builder, that failed to load fast on a 100K WooCommerce products shop.

 

The detection

All our other demos, in the exact same conditions (Cloudways, 100K products), are loading fast.

But with DIVI, it is quite another story: 15 seconds to load the Shop page!

We decided to investigate by activating the Query monitor plugin. Below are the screen captures that led us to find the culprit.

a) 15 seconds (just in PHP, this does not include front-end load times, like images, css and js files)

Image wpsolr-demo-divi-100k-15-seconds.png of Why DIVI load time is 15 seconds on a shop with 100K products

 

b) 0,5 second with Flatsome (same demo, but with Flatsome instead of DIVI)

Image wpsolr-demo-flatsome-100k-sub-seconds.png of Why DIVI load time is 15 seconds on a shop with 100K products
Flatsome: 0,5 second to load 100K products on the shop page

 

c) Slow queries are detected

Image wpsolr-demo-divi-100k-half-second-on-each-image.png.png of Why DIVI load time is 15 seconds on a shop with 100K products

 

d) The PHP call stack of each slow query

Image wpsolr-demo-divi-100k-half-second-on-each-image-call-stack.png.png of Why DIVI load time is 15 seconds on a shop with 100K products

 

The explanation

In past version of DIVI (we checked with 3.0) , the issue was not there.

But in more recent versions, DIVI introduced a method et_get_attachment_id_by_url() to retrieve an attachment id from its url. This method is called for each image in your shop results (15 times in our demo). But the problem is that this method is not scalable: the more products you have in WooCommerce, the slower it gets.

Image wpsolr-demo-divi-2k-100th-second-on-each-image.png.png of Why DIVI load time is 15 seconds on a shop with 100K products
10 times faster on the same demo, with with 2K products instead of 100K

So, on the 2k products demo: 20 x 0.06 = 1.2 seconds spent in et_get_attachment_id_by_url()

But on the 100k products demo: 20 x 0.6 = 12 seconds spent in et_get_attachment_id_by_url()

 

12 seconds or more are spent in a single DIVI function !

 

 

 

 

Related posts ... not powered by WPSOLR 😊