LimeReport Forum

General Category | Основное => Discussion | Обсуждение => Topic started by: Proton Phoenix on May 23, 2021, 08:38:20 AM

Title: LimeReport Ram Usage Bug
Post by: Proton Phoenix on May 23, 2021, 08:38:20 AM
Hi ~~
i have a problem with Limereport and Qt framework

 
Code: [Select]
LimeReport::ReportEngine m_report(this);

    m_report.loadFromFile("C:/random/report.lrxml");
    m_report.createPreviewScene();
        m_report.previewReport();
       

when i open PreviewReport Ram usage grow from 74 mb to 93 mb
but when i close PreviewReport it will be 89 mb so it's only free 4 mb
the problem here is every time opening the PreviewReport will lead the software to eat more memory without clearing the previous one.
is there any solution??
i am using version 1.5.35
Title: Re: LimeReport Ram Usage Bug
Post by: Subst on May 23, 2021, 09:46:58 AM
Hi!
first why you need to call createPreviewScene() ?

createPreviewScene() usefull for customizing the preview, but you've used the standart preview window by calling previewReport

and where you destroing the result QGraphicsScene object?
Title: Re: LimeReport Ram Usage Bug
Post by: Proton Phoenix on May 23, 2021, 09:50:02 AM
Thank you bro <3 i've installed limereport just today i am totally a beginner so i need to remove createpreview ... and destroy QGraphicsScene object !!
Thank you bro i will try that then i will comment here about the results <3
Title: Re: LimeReport Ram Usage Bug
Post by: Subst on May 23, 2021, 09:57:49 AM
it seems that problem exists
but if you don't wanna customize the preview you don't need to call createPreviewScene
it's must reduce the leak in your case
Title: Re: LimeReport Ram Usage Bug
Post by: Proton Phoenix on May 23, 2021, 09:58:56 AM
Many Thanks bro <3


Yes when i removed createpreview .. when closing the preview it releasing 10 to 15 mb of ram usage but the problem still exist because it add 3 to 5 mb every time (opening the preview)
so can you tell me bro ~~ The best way to Destroy QGraphicsScene object!! ?
Title: Re: LimeReport Ram Usage Bug
Post by: Subst on May 23, 2021, 10:22:16 AM
no if you don't call the createPreviewScene() then nothing to delete

but previewReport steel have the mem leaks

Alex knows about problem and looking for solve
Title: Re: LimeReport Ram Usage Bug
Post by: Proton Phoenix on May 23, 2021, 10:27:24 AM
<3 Thank you so much bro for helping me <3
okay i will wait Alex for fixing this memory leaks

-- Great Support from you bro Thank you
Title: Re: LimeReport Ram Usage Bug
Post by: Subst on May 25, 2021, 12:06:43 PM
Alex has fixed the memory leak
it's seem work better
let's try 1.5.86
Title: Re: LimeReport Ram Usage Bug
Post by: Proton Phoenix on May 25, 2021, 01:48:58 PM
Thank you so much bro <3 great support from you <3
Title: Re: LimeReport Ram Usage Bug
Post by: Subst on May 25, 2021, 02:01:44 PM
It's support from Alex
I just have some time right now to answer you :)
Alex hasn't one
Title: Re: LimeReport Ram Usage Bug
Post by: Arin Alex on May 26, 2021, 10:27:44 AM
Proton Phoenix, Hi I've fixed the memory leak and pushed the changes to github. You can check it.