Close

Nop 2.70 Filters - Page Speed

gilesolley
11 years ago
#2009 Quote
Avatar
  • 2
Hi there,

Just wondered if anyone has found a way to improve speed (perhaps indexes) when using Ajax Filters with a large(ish) number of products and filters. I have 700 products with 4600 Specification Attribute mappings, 500 Variant Attribute mappings and then I'm also using the price range filter. Can be seen in action here: http://www.mypad.je/sofa .

We're seeing time to first byte of about 1.7 seconds on the above page. If I remove the filter control, it decreases to about 0.7 seconds.

Any ideas much appreciated.
Boyko
11 years ago
#2010 Quote
Avatar
  • 1570
fireblade669 wrote:
Hi there,

Just wondered if anyone has found a way to improve speed (perhaps indexes) when using Ajax Filters with a large(ish) number of products and filters. I have 700 products with 4600 Specification Attribute mappings, 500 Variant Attribute mappings and then I'm also using the price range filter. Can be seen in action here: http://www.mypad.je/sofa .

We're seeing time to first byte of about 1.7 seconds on the above page. If I remove the filter control, it decreases to about 0.7 seconds.

Any ideas much appreciated.


Hi fireblade669,

The strange thing is that the Ajax Filters does cache the model after the first request and it should be really fast when you open the same category for a second time as no requests to the database are made afterwards.
You can try to Clear the Cache from the administration and measure it, although nopCommerce also caches the Category navigation on the left and it should be much slower.
We will test locally why even though there is caching in the Filters it takes one more second as you describe.

Thanks
Regards,
Nop-Templates.com Team
gilesolley
11 years ago
#2011 Quote
Avatar
  • 2
Thanks for the rapid reply. I will have a peep here to see if there is some reason why the caching might not be working and report back.
Boyko
11 years ago
#2012 Quote
Avatar
  • 1570
fireblade669 wrote:
Thanks for the rapid reply. I will have a peep here to see if there is some reason why the caching might not be working and report back.


Hi fireblade669,

We made some caching improvements to the Nop Ajax Filters. Could you download the Ajax Filters again and update to the latest version for nopCommerce 2.7 and test them? You need to update the plugin .dll only and restart the application.

Please let us know how it goes!

Thanks
Regards,
Nop-Templates.com Team
milo
11 years ago
#2055 Quote
Avatar
  • 14
I have also slow loading with nopCommerce 2.7 and Fashion theme with ajax filters enabled.
Filtering takes up to 5 seconds and sometimes (seems random) more then 10 seconds even when the page is already in cache. With the standard nopCommerce filtering is fast  (< 1 sec).

Our site runs on a fast dedicated VPS, with 3 cores and 4GB ram. I only have enabled  the Specifications Filter in the settings of the ajax filter.

We have multiple variants per products, tier prices and discount rules.
In the catalog controller i have made adjustment for loading categories. This helped reduced the page load considerbly (not for the ajax filtering) Maybe this helps resolve the issue?

/* added preparePiceModel parameter, set to false (performance reasons) */
model.Products = PrepareProductOverviewModels(products,false).ToList();


Please take a look at http://www.papicolor.com/210x297mm-a4 and try out a filter. We want to keep the pageload < 1 sec.
Boyko
11 years ago
#2056 Quote
Avatar
  • 1570
milo wrote:
I have also slow loading with nopCommerce 2.7 and Fashion theme with ajax filters enabled.
Filtering takes up to 5 seconds and sometimes (seems random) more then 10 seconds even when the page is already in cache. With the standard nopCommerce filtering is fast  (< 1 sec).

Our site runs on a fast dedicated VPS, with 3 cores and 4GB ram. I only have enabled  the Specifications Filter in the settings of the ajax filter.

We have multiple variants per products, tier prices and discount rules.
In the catalog controller i have made adjustment for loading categories. This helped reduced the page load considerbly (not for the ajax filtering) Maybe this helps resolve the issue?

/* added preparePiceModel parameter, set to false (performance reasons) */
model.Products = PrepareProductOverviewModels(products,false).ToList();


Please take a look at http://www.papicolor.com/210x297mm-a4 and try out a filter. We want to keep the pageload < 1 sec.


Hi milo,

Please update the Ajax Filters to its latest version as we made some improvements in the caching.
Please refer to this article for the update.

As to the speed please note that the Ajax Filters do much more than the default filters in nopCommerce - i.e take the discounts into account, calculate the available sort options based on the current selection etc. This means that there is no way to make the Filters work as fast as the default nopCommerce filters, which simply filter the products.

Please let us know if you notice any improvement in the filters after the update.

Thanks
Regards,
Nop-Templates.com Team
milo
11 years ago
#2116 Quote
Avatar
  • 14
Hello Boyko,

Please update the Ajax Filters to its latest version as we made some improvements in the caching.
Please refer to this article for the update.


I forget to mention that I already tried that, it made little difference unfortunately.

As to the speed please note that the Ajax Filters do much more than the default filters in nopCommerce - i.e take the discounts into account, calculate the available sort options based on the current selection etc. This means that there is no way to make the Filters work as fast as the default nopCommerce filters, which simply filter the products.

In the ajax filter plugin settings I only have checked "Enable Specifications Filter". At the moment we DONT need attribute,  manufacturer or prices filters. We even dont show prices in the catalog view. If I check "Ignore discounts (sitewide)" in the catalog settings the performance problem is solved so the problem really is in the price calculation, this can be very slow with nopCommerce version 2.7 to 2.8 if you have a lot of products and/or discount rules. (see http://www.nopcommerce.com/boards/t/21814/upgrade-from-26-to-28-performance-hit-27-also-affected.aspx?p=1)

To overcome this problem I already made a small code change which had a huge positive impact on the performance. I'm asking you to reconsider to making a small code change so that when I only have checked "Enable Specifications Filter" all other unnecessary code is not executed (prices/discount logic).

I already tested with disabling the following lines in \Plugins\SevenSpikes.Nop.AjaxFilters\Themes\Fashion\Views\Catalog7Spikes\CategoryTemplate.ProductsInGridOrLines.cshtml

@Html.Hidden("priceRangeFromJson", Model.PriceRangeFromJson)
@Html.Hidden("priceRangeToJson", Model.PriceRangeToJson)


This improved performance alot, but unfortunately when I call the filter the first time in a category the page fails to load.

Really hope you can help as we see loading speed as a very important commercial aspect of our site.

Greetings, Milo

Boyko
11 years ago
#2119 Quote
Avatar
  • 1570
milo wrote:
Hello Boyko,

...

Greetings, Milo



Hi Milo,

Unfortunately we need to calculate the price as it is part of the model and prices do depend on the discounts. We also check ACL and a lot of other stuff that we can't just ignore for the Filters to work correctly. The only way I see this is to create some hidden settings in the Filters that won't be visible on the Settings page but you will be able to set via the All Settings page in nopCommerce. These settings will ignore some of the logic where it is possible i.e ACL, Discounts etc.
Could you drop us an email with a link to your web site, so that we can take a look and discuss further what can be done? A database backup will be a huge help too.

Many thanks!
Regards,
Nop-Templates.com Team