Want to see how SpreadsheetLight performs in terms of speed and memory usage? You’re in the right place.
The machine used to run the test is a Windows 7 machine with 8 processors at 2.80 GHz, with 10 GB of RAM.
Filling lots of cells
Here’s the source code that generates 3 worksheets with randomly generated data. There are 18 columns: 5 string, 3 DateTime, 5 int, 5 double. And 1,000,000 rows each. Yes, that’s 1 million rows (everyone seems to want to break my library…).
Benchmarking 18 columns with 1 million rows in 3 separate worksheets.
I’d put the resulting file for you to download and check, but it’s about 579 megabytes… Download SpreadsheetLight and perform the benchmark test yourself to check. Here’s the resulting console output:
Start of benchmark Total Memory: 89824 After new spreadsheet initialisation: 00:00:00.3042508 Total Memory: 1436976 After setting date format: 00:00:00.3167113 Total Memory: 1437880 After writing 1st worksheet: 00:00:31.9221587 Total Memory: 2318495224 After adding Sheet2: 00:02:02.6000107 Total Memory: 763240128 After writing 2nd worksheet: 00:02:32.9303968 Total Memory: 2960912432 After adding Sheet3: 00:04:01.4925267 Total Memory: 1405524960 After writing 3rd worksheet: 00:04:31.5282136 Total Memory: 3331193952 After saving: 00:06:22.0041439 Total Memory: 424056 End of program
So SpreadsheetLight completes that in about 6 minutes 22 seconds. That’s for 3 (worksheets) * 18 (columns) * 1mill (rows) = 54 million cells.
From the output, it seems that the maximum (or thereabouts) amount of memory consumed is 3331193952 bytes, or 3.1 GB at any one time.
Dumping data with DataTable
Here’s the source code that generates 3 DataTable’s with randomly generated data. There are 18 columns: 5 string, 3 DateTime, 5 int, 5 double. And 1,000,000 rows each. Yes, that’s 1 million rows (everyone seems to want to break my library…).
Benchmarking 18 columns with 1 million rows in 3 different DataTable’s in 3 separate worksheets.
I’d put the resulting file for you to download and check, but it’s about 579 megabytes… Download SpreadsheetLight and perform the benchmark test yourself to check. Here’s the resulting console output:
Start of benchmark Total Memory: 125200 Completed DataTable creation: 00:00:25.4068796 Total Memory: 1548115992 After new spreadsheet initialisation: 00:00:25.7373552 Total Memory: 1549418152 After setting date format: 00:00:25.7500793 Total Memory: 1549418680 After importing 1st DataTable: 00:01:07.0734032 Total Memory: 3350628624 After adding Sheet2: 00:02:40.1500782 Total Memory: 1795371752 After importing 2nd DataTable: 00:03:21.1484316 Total Memory: 3477007464 After adding Sheet3: 00:04:52.1853329 Total Memory: 1921619992 After importing 3rd DataTable: 00:05:31.4473829 Total Memory: 3331239088 After saving: 00:07:24.0292079 Total Memory: 422632 End of program
So SpreadsheetLight completes that in about 7 minutes 24 seconds. That’s for 3 (worksheets) * 18 (columns) * 1mill (rows) = 54 million cells.
From the output, it seems that the maximum (or thereabouts) amount of memory consumed is 3477007464 bytes, or 3.24 GB at any one time.
What about benchmarking against other libraries?
It feels … immodest. The benchmark source code is given above. You can download the benchmark source code and SpreadsheetLight, and run your own tests against the library you’re either already using or considering to use.
Because the only real definitive conclusion has to come from you. Because your situation is unique to you.