Jump to content

Edit History

J. Jackson

J. Jackson


solution

The general solution to the problem was the discovery of an inherent flaw in the "recently viewed items" module. It causes the module's memory usage to scale with the number of active items in the products table.

At 1 million items, the module needs >400MB of RAM. At 3.4 million, it will need ~1.5GB of RAM as the issue scales linearly. The module is pulling back a list of all of the active product IDs in the database 3 times.

Dropping the "recently viewed items" module as well as the "items in the same category" module which has similar but not as pronounced problems, the memory usage for a product display page dropped from 416MB to 5MB. In addition, the load time for the page decreased from 4sec to 19ms.

While I would certainly expect that the load times and memory usage would increase with the use of these 2 modules, they do not scale properly for large product catalogs. 

I will further address this issue in the development forums.

J. Jackson

J. Jackson

Just to clarify what I am asking:

Is there anyone with multiple millions of products loaded into PrestaShop that can give me some pointers on what you needed to do in order to make site perform well? As it stands, the number of queries and memory consumed when I get to around 1 million items is not feasible for me to deploy on a live site. Are there themes, layouts, etc that can be tweaked to limit the amount of overhead the normal store operations require?

I did find some past posts about this sort of thing, but they date back to a decade ago and suggest gutting the core code. I would highly imagine things have largely changed in the last 10 years of Presta development.

×
×
  • Create New...