We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Measurement of spent time on font setting

one more question! I measured time required for font setting. If cell range increases, it will take even longer time for setting How can I make the processing faster? ex) int count = 10; DateTime startTime = DateTime.Now; IFont font = sheet.Range[1,1, count,count].CellStyle.Font; font.FontName = "TimesNewRoman"; font.Size = 8; font.Color = (ExcelKnownColors)3; font.Bold = false; DateTime endTime = DateTime.Now; TimeSpan spentTime = endTime - startTime; // // if count=10, then spentTime is 0.1093780 sec // if count=20, then spentTime is 5.515620 sec (increase 55 tiems) // if count=30, then spentTime is 60.390626 sec (increase 603 times)

1 Reply

AD Administrator Syncfusion Team August 2, 2004 03:04 AM UTC

Hi, Sorry for the delay in responding. I tried to reproduce the problem using this sample TimeForFontSetting_1330.zip However, the time taken with count = 30 was 801 mill secs. Could you please try running this sample and let me know if you see the problem in this sample also. Also, there is a new version that is scheduled to be release this week, which has a number of features/optimizations over the previous version. Thank you for youe co-operation. Best regards, Stephen. >one more question! > >I measured time required for font setting. >If cell range increases, it will take even longer time for setting > >How can I make the processing faster? > >ex) > int count = 10; > > DateTime startTime = DateTime.Now; > > IFont font = sheet.Range[1,1, count,count].CellStyle.Font; > font.FontName = "TimesNewRoman"; > font.Size = 8; > font.Color = (ExcelKnownColors)3; > font.Bold = false; > > DateTime endTime = DateTime.Now; > TimeSpan spentTime = endTime - startTime; > > > // > // if count=10, then spentTime is 0.1093780 sec > // if count=20, then spentTime is 5.515620 sec (increase 55 tiems) > // if count=30, then spentTime is 60.390626 sec (increase 603 times)

Loader.
Up arrow icon