Slow exporting to Excel. Server issue or Nopcommerce?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
This is a general question I wanted to ask.  I'm building a store with 20,000 items in it and using GoDaddy with a deluxe hosting account.

When I export 1,000 items from Nop 3.2 to excel, it seems to be taking quite a long time for the server to respond with the product build sheet to download.  Is this normal?  Nothing is wrong with my install...  

What is the average response time to export a large number of items into the excel spreadsheet?  I'm talking like 7 minutes before I get the response back.

I have a sneaky suspicion that the server I am hosted is the problem.  It's ridiculous.... this means an export of the entire catalog would take over an hour or close to 70 minutes and my client's can't have that.

Alternatively... could this be a server that the database is hosted on?
9 years ago
Godaddy uses bare bones SQL unless you pay for it. Probably SQL Express with 100 other people using it.

Hardware-utilization limits:
Single physical CPU, multiple cores[2]
1 GB of RAM (runs on any size RAM system, but uses only 1 GB)
Absence of the SQL Server Agent service
SQL Express 2008 R2 increased the size limit to 10GB per database. This size limite remains in SQL Express 2012.
9 years ago
I understand but after further research I don't believe the issue is with GoDaddy's database server.  I can connect remotely to the database easily.

The problem seems to be coming from the function in nopCommerce that is generating the spreadsheet.   I have 2000 items loaded so far and it just says waiting and I never receive the spreadsheet when I export.  It works with 1000 items, but it takes 12 minutes before serving me the file.  This is ridiculous.... Any ideas?  or any tweaks I can make to the web.config file would be helpful.

This seems to be a recurring problem from other posts that I have read on the forum so I am thinking that it hasn't been solved.
9 years ago
Also my database file is only 18 megs....  I want to eventually have 20,000 items but it still be a 50 meg file or so.  But if nopCommerce can't handle processing an simple excel spreadsheet then I am concerned for my client.
9 years ago
you have 20,000 items in your store. How did you get them in there?  I bet you wrote a custom import routine; do the same for exports.  You need to write you own routines to do batch processing,  EF will gag.
9 years ago
I have been uploading them 500 at a clip through the backend import.  I cross referenced all the images so that nopCommerce can auto generate them.  I was lucky enough to review an excel spreadsheet from a vendor so I essentially went through column by column to build my own import file

Problem is that it takes 42 seconds for the nopCommerce to serve me the products.xlsx file for 50 items.  In theory it should take just over 6 min for 2000 items but I never receive the file.  It just spins forever and eventually times out after 20 min.
9 years ago
It's not specifically EF.  The Export is slow because
1) uses ProductLoadAllPaged sp.  Lot's of temp tables (most unused since Export call Search with only VendorId), Order By, etc.
2) loop to get all category ids (each a SQL call)
3) loop to get all manufacturer ids (each a SQL call)
4) loop to get 3 pictures (each a SQL call, images can be big, each is written to a file and there's a "lock" when that happens)

So yes, custom code is required.  If you don't need the images, then comment that out, or alternately, write a SQL query and run it in the DB.
9 years ago
OK will changing that store procedure and commenting out certain sections cause any problems with functionality?
9 years ago
Don't change the stored procedure.  I was referring to commenting out code in  \Libraries\Nop.Services\ExportImport\ExportManager.cs

                    //pictures (up to 3 pictures)
                    string picture1 = null;
                    string picture2 = null;
                    string picture3 = null;
                    var pictures = _pictureService.GetPicturesByProductId(p.Id, 3);
                    for (int i = 0; i < pictures.Count; i++)
                    {
                        string pictureLocalPath = _pictureService.GetThumbLocalPath(pictures[i]);
                   ...
9 years ago
Yea I will have to check into that for the future and modify the code a bit to see what I get.  I just upgraded to 3.3 finally today but still am having the same issues.  I can export about 500 to 1000 without a problem, but anymore and I receive a timeout message.

I don't need the pictures for exporting.  So those 3 fields for pic id 1,2,3 are potentially the culprit?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.