Sunday, April 5, 2026 8:25:26 PM

Question: Why is nopAccelerate not used to return results for the category-navigation on the homepage?

12 years ago
#46 Quote
Hi,

I noticed that when I visit the homepage of my local demo nopCommerce website, no data is requested from Solr.
This means that for the category-navigation on the homepage, these queries (including product-counts for each category) is done using the default SQLServer tables (which is obviously much slower than queries to Solr).

Because the homepage is probably the most visited page on your nopCommerce website, I did expect nopAccelerate to perform these category-queries on the homepage. Why isn't this implemented?

thanks,
Dion
0
12 years ago
#47 Quote
Dion wrote:
Hi,

I noticed that when I visit the homepage of my local demo nopCommerce website, no data is requested from Solr.
This means that for the category-navigation on the homepage, these queries (including product-counts for each category) is done using the default SQLServer tables (which is obviously much slower than queries to Solr).

Because the homepage is probably the most visited page on your nopCommerce website, I did expect nopAccelerate to perform these category-queries on the homepage. Why isn't this implemented?

thanks,
Dion


Hi Dion,

This is because this data is cached, so it doesn't request Solr or Database every time. nopAccelerate fetches it from Solr and caches it on the first request. So you didn't noticed any queries made to Solr.


Thanks,
Dharmik
0
12 years ago
#48 Quote

No, I'm sure on the homepage no queries are handled by nopAccelerate/Solr.
You can reproduce this by clearing the cache in the nopCommerce admin (link "Clear Cache" on the top-right).
After clearing the cache and visiting the homepage again, no queries are fired to Solr.

It looks like nopAccelerate/Solr only kicks in after the homepage. And because the homepage is the most visited page, I think nopAccelerate could help improving the performance of this page (because even after a first visit, still a lot of product-data is still fetched from SQL and not from cache)

--Dion
0
12 years ago
#49 Quote
Dion wrote:

No, I'm sure on the homepage no queries are handled by nopAccelerate/Solr.
You can reproduce this by clearing the cache in the nopCommerce admin (link "Clear Cache" on the top-right).
After clearing the cache and visiting the homepage again, no queries are fired to Solr.

It looks like nopAccelerate/Solr only kicks in after the homepage. And because the homepage is the most visited page, I think nopAccelerate could help improving the performance of this page (because even after a first visit, still a lot of product-data is still fetched from SQL and not from cache)

--Dion


Hi Dion,

I will have a look at it today and if its not fetching it from Solr, we'll do it. :)

I agree with you, home page is the most frequently visited page and it must be the fast. And we can use Solr in innovative way to achieve this.

Thanks,
Krunal
0
Thank you for choosing our products!

Your feedback is important to us!
12 years ago
#50 Quote
@Dion:

Whole HomePage is not coming from solr only CategoryNavigation is coming from Solr.

I also agree with you.  Yes, Homepage is most visited page. We will do it very soon.
0
12 years ago
#51 Quote
Dear Dion,

Yes, you're right category navigation block on home page is not coming from Solr. We can load it from solr by writing following code in layout all files in shared folder.

 @Html.Action("CategoryNavigation", "Catalog", new { currentCategoryId = currentCategoryId, currentProductId = currentProductId }); 


Kindly replace following code with above to load it from solr.

 @*Category Navigation loading from nopAccelerate plugin for better performance on all pages of store. *@        
        var _pluginFinder = Nop.Core.Infrastructure.EngineContext.Current.Resolve<Nop.Core.Plugins.IPluginFinder>();
        var _pluginSettings = Nop.Core.Infrastructure.EngineContext.Current.Resolve<XcellenceIT.Plugin.Solr.Products.XcellenceITSolrProductsPluginSettings>();
        if (_pluginFinder.GetPluginDescriptorBySystemName("XcellenceIT.Plugin.Solr.Products") == null || !_pluginSettings.CategoryListingEnable)
        {
            @Html.Action("CategoryNavigation", "Catalog", new { currentCategoryId = currentCategoryId, currentProductId = currentProductId });
        }
        else
        {
            @Html.Action("CategoryNavigation", "SolrProduct", new { currentCategoryId = currentCategoryId, currentProductId = currentProductId });
        }


For now we could not find easy way to do this, if you can find any other way or you have any other suggestion to extend the CategoryNavigation() of CatalogController please let us know, so we can implement it.

Thank you very much for notifying on this issue.
0
Krutal M
nopAccelerate Team