Browsed by
Tag: performance

AJAX loading of related products in Magento 2

AJAX loading of related products in Magento 2

Introduction In some projects the amount of related products can be significant. In my case there were more than 300 related products and upsell products on some product detail pages. The consequence of this was a high time to first byte on product detail pages. In the mentioned project it was about 15 seconds for some of the products. So we searched for a possible optimization. We finally decided to implement asynchronous loading of product recommendations via AJAX. At the…

Read More Read More

How a wrong carrier implementation causes a server outage

How a wrong carrier implementation causes a server outage

Sometimes one wrong line of code can break your site. In the following I will describe a mistake in a Magento 2 custom carrier implementation, which causes a massive overloading of server resources (CPU, RAM, DB processes) and even can cause an outage of your Magento store. The one line of code The following line of code is the reason for the problems, if used in the collectRates() method, or in methods, called from collectRates() in the Carrier class: $quote…

Read More Read More

Cronjob performance optimization: Magento 1 vs. Magento 2

Cronjob performance optimization: Magento 1 vs. Magento 2

Introduction This article is about problems that can occur with Magento cronjobs. The standard way to configure crontab for Magento 1 has it’s limits. The more custom cronjobs  a Magento system has, the more probable the system will face problems considering cronjobs. The most common issues are: Indexer Cronjob (Magento Enterprise malways mode) takes longer than usual so that other cronjobs (mdefault mode) are skipped (not executed) for the time the indexer runs Some of the cronjobs in mdefault scope take a…

Read More Read More