DEV Community

Yegor Shytikov
Yegor Shytikov

Posted on

Magento 2 Configurable products slow. Fix Magento performance issue

Magento 2 configurable products are just containers for simple products (variations). You can no longer configure pricing data directly in the configurable product as the parent configurable inherits all its unit, tier price, and inventory data from the child simple products. So on the configurable product page, Magento loads all the configurations as a simple product. Even a single Magento Product model is slow 300ms to load, what to tell about several products on the same page... The complexity of the configurable products is just terrible. Product with 5 color and 5 sizes it is 5 * 5 + 1 separate SKUs.

Alt Text

Magento 2 Configurable Products are slow to Load!

One of the biggest issues of the Magento 2 is the configurable products. Even Small configurable products can be slow to load in the frontend. I worked on a store with a product that is available in over 50 colors and 10 sizes. This resulted in a configurable product with over 500 child products. Due to Magento 2, Architectural issues products can lead to very slow and takes several minutes to load.

In the frontend, Magento 2 loads all variations in a giant JSON object and renders that into the DOM using the legacy Knockout JS library and Jquery. This JSON object is 1 megabyte for 1000 variations. In the backend, this JSON is also built and passed to a UI component wrapped in XML. Purely written Magento 2 Core PHP code is not able to append extremely large XML structures to an existing XML structure.

Even with 1000 variations page load time for an uncached configurable product was in excess of 60 seconds.

If you are having traffic on your site configurable products will just kill your MySQL database

Fix Magento Configurable Product Performance issue:

Unfortunately, this issue can't be fixed because even simple product is slow in the M2. It is just a waste of money and time to fix a jank car.

Top comments (0)