Free Support Forum - aspose.com

4.4.0 performance degradation with large spreadsheet

Our report application creates large spreadsheets for our users, up to 10,000 rows times 43 cells wide. To test I loaded the same dataset of 15 rows. This DebugView output shows seconds since start of process in the first column. Easy to see that initially it takes about 0.02 seconds per set and at the end it takes over 1 second per sent. Plus, finally it takes 47 seconds for wb.Save() to actually save the 4MB spreadsheet to disk whereas MS Excel does this in a few seconds.

What can be done to improve performance?

414.06790161 [5396] [ProductPricing:16679496] GroupID=1743286 [1 of 536]
414.23992920 [5396] [ProductPricing:16679496] GroupID=1743287 [2 of 536]
414.25503540 [5396] [ProductPricing:16679496] GroupID=1743288 [3 of 536]
414.27084351 [5396] [ProductPricing:16679496] GroupID=1743289 [4 of 536]
414.28836060 [5396] [ProductPricing:16679496] GroupID=1743290 [5 of 536]
414.30557251 [5396] [ProductPricing:16679496] GroupID=1743291 [6 of 536]
414.34872437 [5396] [ProductPricing:16679496] GroupID=1743292 [7 of 536]
414.37103271 [5396] [ProductPricing:16679496] GroupID=1743293 [8 of 536]
414.39498901 [5396] [ProductPricing:16679496] GroupID=1743294 [9 of 536]
[…]
695.32208252 [5396] [ProductPricing:16679496] GroupID=1743812 [527 of 536]
696.49218750 [5396] [ProductPricing:16679496] GroupID=1743813 [528 of 536]
697.65551758 [5396] [ProductPricing:16679496] GroupID=1743814 [529 of 536]
698.80395508 [5396] [ProductPricing:16679496] GroupID=1743815 [530 of 536]
699.95758057 [5396] [ProductPricing:16679496] GroupID=1743816 [531 of 536]
701.10955811 [5396] [ProductPricing:16679496] GroupID=1743817 [532 of 536]
702.28442383 [5396] [ProductPricing:16679496] GroupID=1743818 [533 of 536]
703.44750977 [5396] [ProductPricing:16679496] GroupID=1743819 [534 of 536]
704.63873291 [5396] [ProductPricing:16679496] GroupID=1743820 [535 of 536]
705.80261230 [5396] [ProductPricing:16679496] GroupID=1743821 [536 of 536]
709.13793945 [5396] [ProductPricing:16679496] Saving spreadsheet
756.10583496 [5396] [ProductPricing:16679496] Save complete

Hi,

Thanks for considering Aspose.

Could you create a sample console App with excel file, zip it and post it here to show the issue. We will check it soon. And also give us some details about your env., OS, .NET framework, RAM and other info.

Thank you.

I’ll create a sample app and get back to you.

Mike

I found out that cells.CopyRow is responsible for the performance degradation. I’ve attached a sample console app with the template spreadsheet that it uses. It goes through 500 iterations of copying two header rows and adding 5 lines of dummy data. In reality there would be more data per block and all cells in the row would be filled. Performance for this sample degrades from 0.01s down to 0.58s and with more data the degradation is even worse.

This ran on a Dual Xeon 3.4GHz with 3GB of RAM on Windows XP Pro against .NET 2.0. The degradation happens also on Quad Xeon or Dual Xeon servers running Windows 2000.

00000000 CopyRow #001: row 0012 time: 0.0414649543993389
00000001 CopyRow #002: row 0020 time: 0.0104981850907455
00000002 CopyRow #003: row 0028 time: 0.00984730498769179
00000501 CopyRow #498: row 3988 time: 0.565408302231947
00000502 CopyRow #499: row 3996 time: 0.589743307834608
00000503 CopyRow #500: row 4004 time: 0.581413946949711

Hi,

Thanks for the sample project.

Well, we found the performance problem related to Cells.CopyRow() method, which may be caused by some internal changes. We will figure it out soon.

Thank you.

Any idea when you’ll have a fix available?

Mike

Hi Mike,

Please try this attached fix.

The problem has been resolved with this version.

Thank you,

Mike