Posted 13 February 2020, 2:06 am EST
Hello,
Unless those two pieces of code are not equivalent, I’m measuring a considerable decrease in performance in FlexReport compared to the C1Report.
C1.Win.FlexReport.C1FlexReport objFlex = new C1.Win.FlexReport.C1FlexReport();
objFlex.Load(@"C:\temp\Report\PDF_FLEX_00001#788937#CRM-SP-51423#CORT^CORT.FLXR", "0 - Laudos");
C1.C1Report.C1Report objC1 = new C1.C1Report.C1Report();
objC1.Load(@"C:\temp\Report\PDF_C1_00001#788937#CRM-SP-51423#CORT^CORT.XML", "0 - Laudos");
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
sw.Start();
PdfFilter objFilter = new PdfFilter();
objFilter.FileName = @"C:\temp\Report\Flex.pdf";
objFlex.RenderToFilter(objFilter);
sw.Stop();
long timeFlex = sw.ElapsedMilliseconds;
sw.Reset();
sw.Start();
objC1.RenderToFile(@"C:\temp\Report\C1.pdf", C1.C1Report.FileFormatEnum.PDF);
sw.Stop();
long timeC1 = sw.ElapsedMilliseconds;
Points of attention:
- I’m not measuring the load time, only the render to PDF file.
- The FlexReport file is the migrated C1Report file. Therefore, it’s supposed to be the same(with minor adjustments).
- I didn’t have a 100% isolated environment, but I run 3 times and got the following results (FlexReport is taking twice as much time. )
Test 1
C1 75544 ms
Flex 184931 ms
Test 2
C1 79036 ms
Flex 210533 ms
Test 3
C1 74028 ms
Flex 184828 ms
C1 Average 76202 ms
Flex Average 193430 ms
-
I’ll put a link here, because the file is too big to attach (I created a big report file on purpose to get a better grasp)
https://easyupload.io/ojc1w5 -
The pdf file of both rendering, I’m my opinion has no visual difference, but has a significant difference on size. (C1Report - 439KB vs FlexReport 6417KB)
In the end, Am I converting PDF the wrong way or is it something else ?