Memory leak when exporting as HTML

  • KMR_QAD 8 months, 2 weeks ago

    I’m experiencing an issue with exporting a report to HTML. I’m sending several thousand emails with the HTML report attached in the email, but it seems like there is ~2mb jump in memory when the report is exported that never gets released. Over several thousand iterations, it’s causing our service to crash.

    We give our users the option to send the report as either HTML or DHTML, or as PDF. HTML and HDTML both exhibit this problem where-as PDF does not. There doesn’t seem to be anything special about the PDF implementation we use that would suggest a problem on our side.

    Is this something you’ve seen or have fixed in any later versions of Active Reports?

    Private WithEvents rpt As GrapeCity.ActiveReports.SectionReport = Nothing
    Dim pdfExp As GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport = Nothing
    Dim htmlExp As GrapeCity.ActiveReports.Export.Html.Section.HtmlExport = Nothing
    Select Case True
                            Case (m_exportFormat = exportFormats.HTML) Or (m_exportFormat = exportFormats.DHTML)
                                htmlExp = New GrapeCity.ActiveReports.Export.Html.Section.HtmlExport
                                If m_exportFormat = exportFormats.HTML Then
                                    htmlExp.OutputType = GrapeCity.ActiveReports.Export.Html.Section.HtmlOutputType.LegacyHtml
                                    htmlExp.OutputType = GrapeCity.ActiveReports.Export.Html.Section.HtmlOutputType.DynamicHtml
                                End If
                                If Not m_memStream Is Nothing Then
                                    htmlExp.Export(rpt.Document, m_memStream)
                                    bReturn = True
                                    htmlExp.Export(rpt.Document, m_exportPath)
                                    bReturn = True
                                End If
                                htmlExp = Nothing
                            Case exportFormats.PDF
                                pdfExp = New GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport
                                pdfExp.Export(rpt.Document, m_exportPath)
  • 195p
    AbdiasM195p 8 months, 2 weeks ago

    I tried replicating your scenario by exporting a 70+ page Section Report into HTML Format via 100 iterations using AR11 and the memory consumed turned out to be ~16mb. Attached are screen-shots of Diagnostic tool showing memory consumption before and after exporting. I suggest you try using the latest version AR11 and see the memory consumption. There have been a lot of major improvements from ActiveReports 7. If the problem persists, then it’ll be helpful if you can send across your application along with the report, so I can also reproduce it and proceed further.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.