- 12
Hi,
I noticed that page load time with Nop Ajax Cart enabled is much longer then it was before so I did some investigation. I found out that the reason is calling GetAddProductToCartAjaxButton action method through AJAX for every product listed on the page. One call takes ~80ms and is performed in serial for all products, resulting in ~1 sec page load lag for catalog page with 12 products (my default).
Result of this call is pretty simple HTML with few input tags, so I'm assuming it can be called using Html.Action (thus saving client <-> server roundtrips) or even better rendered using Html.Partial (saving also ASP.NET MVC request overhead).
Exactly the same problem appears in product details page with multiple variants - NopAjaxCart/GetAddProductVariantToCartAjaxButton action method is called count_of_variants_times
This can give us major performance and UX gain ;-)
Thanks!
Marek
I noticed that page load time with Nop Ajax Cart enabled is much longer then it was before so I did some investigation. I found out that the reason is calling GetAddProductToCartAjaxButton action method through AJAX for every product listed on the page. One call takes ~80ms and is performed in serial for all products, resulting in ~1 sec page load lag for catalog page with 12 products (my default).
Result of this call is pretty simple HTML with few input tags, so I'm assuming it can be called using Html.Action (thus saving client <-> server roundtrips) or even better rendered using Html.Partial (saving also ASP.NET MVC request overhead).
Exactly the same problem appears in product details page with multiple variants - NopAjaxCart/GetAddProductVariantToCartAjaxButton action method is called count_of_variants_times
This can give us major performance and UX gain ;-)
Thanks!
Marek