Memory Load best practices
-
- Posts: 33
- Joined: Fri Aug 20, 2010 3:46 am
- Location: Lebanon - Beirut
Memory Load best practices
Greetings,
We are using Stimulsoft Reports.Net 2011.1 release.
We have developed a console application to measure the Physical Memory Peak Working Set value for different amount of rows. Results as follows:
1,000 rows - > 28.52 MB
10,000 rows - > 58.37 MB
100,000 rows - > 341.12 MB
C# Code snippet:
Reports.Report objReport = new Reports.Report(); // Precompiled assembly
List objBooks = GetBooks(_intNumberOfRecords);
objReport.RegBusinessObject("Book", "Book", objBooks);
objReport.Render(false);
objReport.ExportDocument(StiExportFormat.Excel2007, _strFilePath);
Question:
Is there a better way to export the file with less amount of memory consumed ? Something like lazy loading ?
Thank you in advance.
We are using Stimulsoft Reports.Net 2011.1 release.
We have developed a console application to measure the Physical Memory Peak Working Set value for different amount of rows. Results as follows:
1,000 rows - > 28.52 MB
10,000 rows - > 58.37 MB
100,000 rows - > 341.12 MB
C# Code snippet:
Reports.Report objReport = new Reports.Report(); // Precompiled assembly
List objBooks = GetBooks(_intNumberOfRecords);
objReport.RegBusinessObject("Book", "Book", objBooks);
objReport.Render(false);
objReport.ExportDocument(StiExportFormat.Excel2007, _strFilePath);
Question:
Is there a better way to export the file with less amount of memory consumed ? Something like lazy loading ?
Thank you in advance.
- Attachments
-
- 1009.PerformanceAnalysis.7z
- (1.12 MiB) Downloaded 448 times
Memory Load best practices
Hello,
Please try to set the ReportCacheMode property of the report to On.
Thank you.
Please try to set the ReportCacheMode property of the report to On.
Thank you.
-
- Posts: 33
- Joined: Fri Aug 20, 2010 3:46 am
- Location: Lebanon - Beirut
Memory Load best practices
Hi Ivan,
New figures for ReportCacheMode = True:
1,000 rows - > 28.5 MB
10,000 rows - > 82.85 MB
100,000 rows - > 580.4 MB
It is important to mention the following for 100,000 rows export:
1- The export is much much slower which is expected.
2- The peak remained at 68 MB for approx. 3 minutes at the beginning then suddenly increased crazily to reach the above figure.
Waiting for your reply.
Cheers
New figures for ReportCacheMode = True:
1,000 rows - > 28.5 MB
10,000 rows - > 82.85 MB
100,000 rows - > 580.4 MB
It is important to mention the following for 100,000 rows export:
1- The export is much much slower which is expected.
2- The peak remained at 68 MB for approx. 3 minutes at the beginning then suddenly increased crazily to reach the above figure.
Waiting for your reply.
Cheers
- Fabio Pagano
- Posts: 355
- Joined: Mon Apr 16, 2007 12:38 pm
- Location: Bari (Italy)
Memory Load best practices
Don't know if this can help, but i have solved memory problems with this code:
Thank you.
Code: Select all
Dim Report As Stimulsoft.Report.StiReport = New Stimulsoft.Report.StiReport
Dim CacheFolder As String = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "StimulsoftReportsCache")
If Not System.IO.Directory.Exists(CacheFolder) Then
System.IO.Directory.CreateDirectory(CacheFolder)
End If
Report.ReportCachePath = CacheFolder
Report.ReportCacheMode = Stimulsoft.Report.StiReportCacheMode.On
Report.RenderedPages.CanUseCacheMode = True
Report.RenderedPages.CacheMode = True
Report.RenderedPages.Clear()
...create report here
-
- Posts: 33
- Joined: Fri Aug 20, 2010 3:46 am
- Location: Lebanon - Beirut
Memory Load best practices
Hi Fabio,
Your code did not mitigate the memory peak, it has the same impact as setting the ReportCacheMode property to On.
The files, which have GUID names, are created inside the StimulsoftReportsCache folder but no improvement in memory consumption.
Thank you.
Your code did not mitigate the memory peak, it has the same impact as setting the ReportCacheMode property to On.
The files, which have GUID names, are created inside the StimulsoftReportsCache folder but no improvement in memory consumption.
Thank you.
Memory Load best practices
Hello,
The ReportCacheMode property affects the rendering of the report.
Exports in table mode (rtf, word, excel, csv) currently do not support caching, but it is in our plans for this year.
In some cases reducing the memory consumed can be achieved by changing the design.
Please send us a sample report template with data or a simple test project, and we'll see what can be done.
Thank you.
The ReportCacheMode property affects the rendering of the report.
Exports in table mode (rtf, word, excel, csv) currently do not support caching, but it is in our plans for this year.
In some cases reducing the memory consumed can be achieved by changing the design.
Please send us a sample report template with data or a simple test project, and we'll see what can be done.
Thank you.
-
- Posts: 33
- Joined: Fri Aug 20, 2010 3:46 am
- Location: Lebanon - Beirut
Memory Load best practices
Hi Andrew,
As per your request, I have attached the test project.
Thx & regards,
As per your request, I have attached the test project.
Thx & regards,
-
- Posts: 33
- Joined: Fri Aug 20, 2010 3:46 am
- Location: Lebanon - Beirut
Memory Load best practices
Hello again,
Figures for ReportCacheMode = True & Export Format = pdf
1,000 rows - > 30.4 MB
10,000 rows - > 59.9 MB
100,000 rows - > 84.45 MB
Great !!!
We are looking forward to receive the same for excel format in your future release.
Thx a lot
Figures for ReportCacheMode = True & Export Format = pdf
1,000 rows - > 30.4 MB
10,000 rows - > 59.9 MB
100,000 rows - > 84.45 MB
Great !!!
We are looking forward to receive the same for excel format in your future release.
Thx a lot
-
- Posts: 33
- Joined: Fri Aug 20, 2010 3:46 am
- Location: Lebanon - Beirut
Memory Load best practices
Andrew,
Could you please let us know the release date for caching support ?
Thank you.
Could you please let us know the release date for caching support ?
Thank you.
Memory Load best practices
Hello,
We have investigated your project. Your report is built correctly and there is nothing to optimize.
So the only workaround now is caching when you export.
The exact date of implementation cannot be called until we have tasks of higher priority.
Approximately it is the end of summer - autumn.
Thank you.
We have investigated your project. Your report is built correctly and there is nothing to optimize.
So the only workaround now is caching when you export.
The exact date of implementation cannot be called until we have tasks of higher priority.
Approximately it is the end of summer - autumn.
Thank you.