Get Free Audit

Optimizing the Operation Speed of the Function CleanPositions in Prestashop

Aug 27, 2014

499 Alex 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.

Igor Dragun
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
Igor Dragun
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. 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

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