nopCommerce 2.50 poor performance

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Hi,
I'm using nop 2.50 for a new customer (previously have used only 1.x) and I'm finding it's much slower than previous versions.  Sometimes it will take 10+ seconds to serve a page even on localhost (which is a quad-core i5 with 12GB of RAM and an SSD system drive on Win 7 64bit).

I've run a crawler on the site and it seems to be loading pages at around 5-10 times slower second than on any other site hosted on my machine (including other sites which load all their content from a DB). There seems to be a minimum of 600ms delay to load each page, but it can be up to 5 seconds just to load the HTML sometimes.

I'm a bit worried that there are thousands of results on Google for "nopcommerce poor performance" and perhaps nop 2.50 will always be slow once it's got more than a few hundred products in it? Perhaps this is due to it's use of Entity Framework rather than direct access and optimised stored procedures, or maybe nopCommerce is just getting too complicated now? Can it just not cope with 200+ products? This would be especially worrying, as it's our intention to load 2000 products for go-live.

Are there any settings or modifications I can make which will improve peformance? Perhaps by turning off things we're not using? I've already turned off a couple of things, like the count of products on categories.

Does anyone I have a live 2.50 website I look around which has several hundred products on it?
Thanks,
Nick
11 years ago
Have you checked that the database has indexes?
11 years ago
Have you seen these posts?

https://www.nopcommerce.com/boards/t/17132/nopcom-v25-mobile-device-support-kills-performance-slow.aspx

https://www.nopcommerce.com/boards/t/16551/nopcommerce-slow.aspx

There are also several performance related change sets on Codeplex which you should apply.
11 years ago
Thanks for that. I tried turning off mobile support and that makes no difference for me. It seems that nopCommerce is just not internally very efficient at the moment BUT it sounds like Andrei has implemented some improvements in the upcoming version (2.60) so I look forward to that.  My problem then will be having to upgrade to 2.60 as upgrading to new versions of NC is very difficult after customisation and adding new database fields etc :(

I think they just need to sit down with the ANTS profiler (ANTS profiler http://www.red-gate.com/products/dotnet-development/ants-performance-profiler/ ) and nail down why each page makes so many database requests (over 80 per page!). The use of Entity Framework won't help of course as ORMs are never as fast as native code. As an aside, I don't understand why someone would retrofit EF (or any other ORM) into an existing project. Any ideas? Normally one would only use an ORM on a new project as there are few advantages to using an ORM when you've already written the data access layer. I'm personally disappointed that they threw away the proper data access layer and went to Entity Framework as I'm not convinced it's really suited to an application like NopCommerce.

The crux of the problem is mentioned in this post:
https://www.nopcommerce.com/boards/t/16581/nop-25-slow-performance-caused-by-badly-used-ef-absolutely-useless-in-the-real-world.aspx

Many of the problems seem to come back a lack of flexibility with query optimisation and database access when using EF so perhaps although certain optimisations can be improved in places, nopCommerce will essentially always be slow from now on?

Lets hope that 2.60 and future versions are noticeably faster :)
11 years ago
Yes, the use of Entity Framework has been criticized by quite a few people. I'm not a fan either - It feels like a university debate: object vs's relational . From what I have read EF is just not ready yet.  - I too would prefer a data layer and stored procedures, but that's largely because that's what I know.

I have a live site with a home page that downloads fully in 2 seconds approx. I have spent time optimising the front end and applied most of the performance change sets.  I disabled the mobile support which stopped an occasional and unpredictable 10 / 20 second download time. There's about 280 product variants of 150 products. I also made tweaks to IIS config. to leverage more RAM on our VPS server which helps.

http://www.ckode.dk/server-configuration/tuning-iis-7-for-static-content/
11 years ago
nmg196 wrote:
...each page makes so many database requests (over 80 per page!)...

The upcoming version 2.60 has about 20-30 database requests per page (average). It's much faster.
P.S. There are a lot of database requests for loading locale resources when opening a page for the first time (one request for each locale). You can set 'LocalizationSettings.LoadAllLocaleRecordsOnStartup' setting to 'true' to ensure that all resources are loaded on application startup.


P.P.S. I won't discuss other points here. They were discussed a lot of times in forum topics which [email protected] referenced above. There are also a lot of other forum topics about 2.X performance
11 years ago
Thanks Andrei. 30 DB requests per page is still a large amount. Is there any scope to reduce that further or perhaps use caching? There aren't even 30 things on a page which need loading so I'm not really sure where all these requests come in :)

I've also read in a couple of places that EF 5 has performance improvements over EF 4... Are you looking to make the move to EF 5 soon? If so I may skip the 2.60 release and wait for a future version.
11 years ago
nmg196 wrote:
Thanks Andrei. 30 DB requests per page is still a large amount. Is there any scope to reduce that further or perhaps use caching? There aren't even 30 things on a page which need loading so I'm not really sure where all these requests come in :)

Sure


nmg196 wrote:
I've also read in a couple of places that EF 5 has performance improvements over EF 4... Are you looking to make the move to EF 5 soon? If so I may skip the 2.60 release and wait for a future version.

EF 5 is supported only by .NET 4.5 and we do not plan to move to it in the near time (it's still BETA)
11 years ago
nmg196 wrote:
Thanks Andrei. 30 DB requests per page is still a large amount. Is there any scope to reduce that further or perhaps use caching? There aren't even 30 things on a page which need loading so I'm not really sure where all these requests come in :)

I've also read in a couple of places that EF 5 has performance improvements over EF 4... Are you looking to make the move to EF 5 soon? If so I may skip the 2.60 release and wait for a future version.


nmg, nopCommerce is fine. I had the same issue, but I found out it was my machines that had the problem. Each server is different. But nopCommerce is pretty fast after I fixed my issue.
11 years ago
i have same problem with my nop 1.9 version web site , is there any code change or another settings to make 1.9 site more fast speed ?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.