+100,000 categories

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hi,

Using nopCommerce v3.80 and nopAccelerate

Our store is having over 100,000 categories at the moment, we plan to go live with about 1,000,000 and couple million products as part of the migration from our old eCommerce to nopCommerce.

The method CatalogController.PrepareCategorySimpleModels() as we see in v3.80/3.90 loads all the categories and build the recursively the hierarchy, making the website startup very long, and timing out the ASP.NET.

What would be the optimization in the CatalogController.cs to avoid this problem?

Thanks for the help.
6 years ago
I believe the method you are referring to is CatalogModelFactory.PrepareCategorySimpleModels()
6 years ago
seanrock wrote:
I believe the method you are referring to is CatalogModelFactory.PrepareCategorySimpleModels()


CatalogModelFactory exists in 3.90 not in 3.80.

However I had a pick into it and the method is basically the same as in 3.80, based on a recursive call
6 years ago
[email protected] wrote:
Hi,

Using nopCommerce v3.80 and nopAccelerate

Our store is having over 100,000 categories at the moment, we plan to go live with about 1,000,000 and couple million products as part of the migration from our old eCommerce to nopCommerce.

The method CatalogController.PrepareCategorySimpleModels() as we see in v3.80/3.90 loads all the categories and build the recursively the hierarchy, making the website startup very long, and timing out the ASP.NET.

What would be the optimization in the CatalogController.cs to avoid this problem?

Thanks for the help.


A few things you need to think about, at least, there are a few things i would consider here. First, you need to follow the code to understand what its doing. Its loading localized data, languages, its getting the urls for the categories, its getting the number of products in the categories...basically its doing a lot. Also, its caching the results. So how much memory is that going to use. Not mention serialization (in and out of cache).

If it was me, i would build that model once and store it, say in a lucene index, ravendb or a simple text file.
6 years ago
seanrock wrote:
Hi,

Using nopCommerce v3.80 and nopAccelerate

Our store is having over 100,000 categories at the moment, we plan to go live with about 1,000,000 and couple million products as part of the migration from our old eCommerce to nopCommerce.

The method CatalogController.PrepareCategorySimpleModels() as we see in v3.80/3.90 loads all the categories and build the recursively the hierarchy, making the website startup very long, and timing out the ASP.NET.

What would be the optimization in the CatalogController.cs to avoid this problem?

Thanks for the help.

A few things you need to think about, at least, there are a few things i would consider here. First, you need to follow the code to understand what its doing. Its loading localized data, languages, its getting the urls for the categories, its getting the number of products in the categories...basically its doing a lot. Also, its caching the results. So how much memory is that going to use. Not mention serialization (in and out of cache).

If it was me, i would build that model once and store it, say in a lucene index, ravendb or a simple text file.


Ok thanks seanrock, my primary concern was if an existing solution was around. We think to store the model in Redis or Solr later
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.