EmicoEcommerce / Magento2TweakwiseExport

Magento 2 module for Tweakwise export
Other
1 stars 10 forks source link

Bugfix speed improvements #31

Closed ah-net closed 3 months ago

ah-net commented 4 months ago

This pull request brings about a 20% improvement in export speed for production sites(based on my very limited dataset).

It addresses two main issues:

1) Previously, $this->log->debug was invoked for every category/product to log a message in the debug log, without checking if the site is in production mode. This incurred unnecessary overhead as the function is slow and doesn't log anything in production mode. The fix involves adding a check for production mode before invoking the function.

2) Price fields were fetched for each row within the getPriceValue function. However, since the price fields are already known, they are now passed to the function instead of being fetched again for every price.