Performance issues - can set flush to file?
I am generating an xls file with 32000 rows and approx 10 columns per row. I am formatting each cell with font, borders, backcolor, text and formatting (time, decimals, strings etc).
It takes about 1/2 hour to generate this report. After I ran a couple of such reports I received out of memory errors in my component.
I was wondering if there are any options on the xlsio that allow me to flush to file so that memory doesnt get too big.
Are there any "secret" performance tips that would help me out here?
Regards,
Kelley
It takes about 1/2 hour to generate this report. After I ran a couple of such reports I received out of memory errors in my component.
I was wondering if there are any options on the xlsio that allow me to flush to file so that memory doesnt get too big.
Are there any "secret" performance tips that would help me out here?
Regards,
Kelley
SIGN IN To post a reply.
3 Replies
BP
Bhuvaneswari P
Syncfusion Team
April 10, 2008 11:04 AM UTC
Hi Kelley,
Thank you for posting your query to us.
We have improved the performance in our latest versions.
Here is the sample that we have used to test this issue,
http://www.syncfusion.com/development/uploads/CS_56f78a2b.zip
It just takes less than 1 min. Please upgrade to our new Candidate release version 6.2.0.32 from the below forum thread.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=72816
When more styles are added, it is recommended to use global styles within BeginUpdate and EndUpdate calls. Use of IMigrant Range will reduce the considerable memory usage, when large amount of strings are used.
Here are some code snippets that improve performance.
[C#]
IStyle bodyStyle = workbook.Styles.Add("BodyStyle");
bodyStyle.BeginUpdate();
//Add custom colors to the palette.
workbook.SetPaletteColor(9,Color.FromArgb(239,243,247));
bodyStyle.Color = Color.FromArgb(239,243,247);
bodyStyle.Borders[ExcelBordersIndex.EdgeLeft].LineStyle = ExcelLineStyle.Thin;
bodyStyle.Borders[ExcelBordersIndex.EdgeRight].LineStyle = ExcelLineStyle.Thin;
bodyStyle.EndUpdate();
//Sets style for the whole column
sheet.SetDefaultColumnStyle(1,colCount,bodyStyle);
If still the issue exists, could you please try reproducing it in the above sample and send us the modified sample, so that we could sort out the cause of the issue and provide you a solution?
Please let me know if you have any other questions.
Best Regards,
Bhuvana
Thank you for posting your query to us.
We have improved the performance in our latest versions.
Here is the sample that we have used to test this issue,
http://www.syncfusion.com/development/uploads/CS_56f78a2b.zip
It just takes less than 1 min. Please upgrade to our new Candidate release version 6.2.0.32 from the below forum thread.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=72816
When more styles are added, it is recommended to use global styles within BeginUpdate and EndUpdate calls. Use of IMigrant Range will reduce the considerable memory usage, when large amount of strings are used.
Here are some code snippets that improve performance.
[C#]
IStyle bodyStyle = workbook.Styles.Add("BodyStyle");
bodyStyle.BeginUpdate();
//Add custom colors to the palette.
workbook.SetPaletteColor(9,Color.FromArgb(239,243,247));
bodyStyle.Color = Color.FromArgb(239,243,247);
bodyStyle.Borders[ExcelBordersIndex.EdgeLeft].LineStyle = ExcelLineStyle.Thin;
bodyStyle.Borders[ExcelBordersIndex.EdgeRight].LineStyle = ExcelLineStyle.Thin;
bodyStyle.EndUpdate();
//Sets style for the whole column
sheet.SetDefaultColumnStyle(1,colCount,bodyStyle);
If still the issue exists, could you please try reproducing it in the above sample and send us the modified sample, so that we could sort out the cause of the issue and provide you a solution?
Please let me know if you have any other questions.
Best Regards,
Bhuvana
FP
Frederic Prevost
April 16, 2008 01:01 PM UTC
Hello,
I've just downloaded XlsIO to replace Excel Automation / C# to try to reduce export times which are around 10 minutes.
I've the same problematic than you. i have to fill cells and apply individual style to each cells.
My first tries done just after the port to XlsIO were bad. An export initialy done under Excel in 3:00 minutes was done in 2:30...
After I've implemented use of IMigratRange it speeds up but only to 1:40 minute...
So ! it was not as wonderfull I wish.
After that, I've used Lutz Roeder's .Net Refector to try to understand.
I think that I find the solution !
First, put IWorksheet.IsStringsPreserved = false;
Secondary, use Value2 on you IMigratRange.
Now my exports run in 4 secondes, and the big one which ran in 10 minutes , run now in less than 10 seconds !
Regards,
>I am generating an xls file with 32000 rows and approx 10 columns per row. I am formatting each cell with font, borders, backcolor, text and formatting (time, decimals, strings etc).
It takes about 1/2 hour to generate this report. After I ran a couple of such reports I received out of memory errors in my component.
I was wondering if there are any options on the xlsio that allow me to flush to file so that memory doesnt get too big.
Are there any "secret" performance tips that would help me out here?
Regards,
Kelley
I've just downloaded XlsIO to replace Excel Automation / C# to try to reduce export times which are around 10 minutes.
I've the same problematic than you. i have to fill cells and apply individual style to each cells.
My first tries done just after the port to XlsIO were bad. An export initialy done under Excel in 3:00 minutes was done in 2:30...
After I've implemented use of IMigratRange it speeds up but only to 1:40 minute...
So ! it was not as wonderfull I wish.
After that, I've used Lutz Roeder's .Net Refector to try to understand.
I think that I find the solution !
First, put IWorksheet.IsStringsPreserved = false;
Secondary, use Value2 on you IMigratRange.
Now my exports run in 4 secondes, and the big one which ran in 10 minutes , run now in less than 10 seconds !
Regards,
>I am generating an xls file with 32000 rows and approx 10 columns per row. I am formatting each cell with font, borders, backcolor, text and formatting (time, decimals, strings etc).
It takes about 1/2 hour to generate this report. After I ran a couple of such reports I received out of memory errors in my component.
I was wondering if there are any options on the xlsio that allow me to flush to file so that memory doesnt get too big.
Are there any "secret" performance tips that would help me out here?
Regards,
Kelley
YG
Yavanaarasi G
Syncfusion Team
April 30, 2008 09:20 AM UTC
Hi Kelley,
Thank you for your update.
Glad to hear that it works fine.
Kindly let me know if you have any other questions.
Regards,
G.Yavana
Thank you for your update.
Glad to hear that it works fine.
Kindly let me know if you have any other questions.
Regards,
G.Yavana
SIGN IN To post a reply.
- 3 Replies
- 4 Participants
-
KE kelley
- Apr 9, 2008 05:35 PM UTC
- Apr 30, 2008 09:20 AM UTC