Unnecessary recalculation of product list pricing causes huge slowdowns #14941
Labels
Fixed in 2.1.x
The issue has been fixed in 2.1 release line
Fixed in 2.2.x
The issue has been fixed in 2.2 release line
Fixed in 2.3.x
The issue has been fixed in 2.3 release line
Issue: Format is valid
Gate 1 Passed. Automatic verification of issue format passed
Partner: Reach Digital
Pull Request is created by partner Reach Digital
up for grabs
Preconditions
Steps to reproduce
Expected result
Actual result
If we can disable the recalculation of tax we get the following result:

Please note that this is with xdebug enabled, so overal performance is bad over here, but the percentual difference is present with xdebug disabled.
The problem seems to lie in the following method:
magento2/app/code/Magento/Tax/Model/Config.php
Lines 847 to 849 in 9c14af7
The highlighted line should be
false
. If we fix that line the calculation time for the price template goes from 4.3 seconds to 1.6 seconds. This means a 2.7 seconds performance improvement.In the last chart you can still see room for improvement as the
final_price.phtml
tempalte still takes 31% of total page load time, while I would expect this to be a lot less. So investigating further still.The text was updated successfully, but these errors were encountered: