Dear Aspose,
I have been using Aspose.Cells to create a software for my clients.
I am now required to tune the performance to its best.
It is found that loading workbook for the first time
takes far more time than the second time, i.e. Doing it twice consecutively.Long boring codes:
For example // Code attached
for (int i = 1; i < 3; i++)
{
Workbook wb = new Workbook(“Blank.xlsx”)
wb.DoSomething();
wb.Save(“Result.xlsx”);
}
Time used
1st time: 630ms
2nd time: 11ms
=========================Separator=======================
As a workaround, I preload the workbook once before actually doing work
// Code also attached
Workbook preLoadWB = new Workbook(“Blank.xlsx”)
for (int i = 1; i < 3; i++)
{
Workbook wb = new Workbook(“Blank.xlsx”)
wb.DoSomething();
wb.Save(“Result.xlsx”);
}
Time used
1st time: 178ms
2nd time: 6ms
Potential?
The performance is getting better after preloading the workbook
But the performance for the first time really is what we are looking to improve.
(as my clients are mostly doing work once only and 178ms is not very ideal while comparing to the second attempt 6ms)
Question
Is there a way that I can workaround and make the “first” attempt as fast as the “second”?
Testing machine:
i5 - 4460 3.2GHz
8GB Ram
64 bit
Win 10
Aspose.Cells 17.01.12
Remark:
Memory is not my concern
.Net 4.5 is acceptable (3.5 would be better)
I really hope that I can make my software as fast as possible.
Many many many thanks,
Jonathan Lau