Hi all,
I'm having issues with the PDF plugin throwing OutOfMemory exceptions (this issue also existed in v7). I'm trying to create 10 PDFs, 2000 - 3000 pages each. The first five or six finish correctly, but during the seventh I run out of memory. (I am calling pdf.CloseDocument() after I call pdf.SaveToFile(), which does free up most of the memory).
I ran the ANTS memory profiler over the application and think I've identified the issue. Every time a page is created using pdf.AddImageFromGdPictureImage(...) a string reference is made to the image's cached bitmap. That makes sense, but apparently those strings are stored statically, because calling pdf.CloseDocument() does not release them from memory (I've attached a screenshot of the memory profiler, titled "strings.png").
I'm sure this usually doesn't matter, but when creating PDFs with thousands of pages those strings become expensive, and they're useless after the document is closed. Is there any way you guys can alter pdf.CloseDocument() to dereference them?
I've also attached a value dump of the string's static parent object. Obviously the other members of this class also hurt the memory consumption, but the string member if far more expensive than any other member in the class).
Thank you all for your help.
Large PDF Memory Issues (OutOfMemoryException)
Re: Large PDF Memory Issues (OutOfMemoryException)
Hi,
We also use ants memory profiler and performance profiler to make GdPicture stronger.
Anyway, I never identified such issue.
It is possible to get a snippet that we can run in batch to reproduce the problem ?
If you can sent it to https://www.gdpicture.com/support/getting-support-from-our-team it should be great.
Cheers,
Loïc
We also use ants memory profiler and performance profiler to make GdPicture stronger.
Anyway, I never identified such issue.
It is possible to get a snippet that we can run in batch to reproduce the problem ?
If you can sent it to https://www.gdpicture.com/support/getting-support-from-our-team it should be great.
Cheers,
Loïc
Who is online
Users browsing this forum: No registered users and 1 guest