Optimizing the Operation Speed of the Function CleanPositions in Prestashop

Aug 27, 2014113Alex Simonchik
Optimizing the Operation Speed of the Function CleanPositions in Prestashop

This tip will help you to optimize the operation speed of the function cleanPositions. This function is used in the standard import feature and it is loading the database pretty much due to a large number of ‘Update’ requests.

This can become a serious problem if there is a large number of products in the directory, while the updated function works much faster.

Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Igor

Thanks for this solution to our friend and colleague Alexander Deynichenko.

The second method is proposed by Pavel Novitsky:

Create a procedure

and run it in cleanPositions() as

Partner With Us Looking for a partner that will help you to grow your business? We are the right company to develop your webstore. Feel free to get in touch with us. We will be happy to discuss your business opportunities and provide you with a Free Quote. Talk to Igor

3 Comments

  1. lordbdp,

    This code should replace Product::cleanPosition($id_category) i.e. it is best to place it in the file override / classes / Product.php.

Post a new comment

top
BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *