PDF-Lib Garbage Collection Questions #1746
Unanswered
developmentBuild
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Some context:
I'm currently using pdf-lib to do some server side pdf generating and it's been working quite well. One thing I've noticed was a large spike in my server memory through out the day when the server is in use. I'm quite confident to identify PDB-Lib as the under lying cause since there are quite a few images being loaded and the document size is dynamic dependent of the data used, other then that the server mainly handles simple db request. I'm doing optimisation by implementing a queue to ensure FIFO of pdf generation instead of just allowing each request to create immediately.
But I also want to know what is the current behaviour when it comes to garbage collection when it comes to pdf documents that have called the
.save()
method. Is there a way to reference the doc instance and tell it to immediately start garbage collection i.e:Or does it happen immediately after
save()
?I saw there was an initial discussion on it in the an issues: #914 but it didn't really answer my question.
Beta Was this translation helpful? Give feedback.
All reactions