-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak just including the module #10
Comments
Hi @jessewilliams1 Thanks for submitting this. I'll look into it. |
This looks suspiciously like an infinite loop if it were called:
|
Hmmm. I'll test it out. Thanks for your patience. |
Hey @joelcolucci, the leak is probably due to the JSDOM library and the fact that you are reading the quill file synchronously. That could have an impact when converting large files. The reason why the leak occurs by just including the file is that the reading of the file is done at the top level. So whether you use the package or not, it will always read the files. I'm using this package locally and how I solved it is by using The performance improved greatly. |
Thanks @adesege. I'll try out those adjustments. I appreciate your time and feedback. |
You are welcome man! The package gave me a good start though. Thanks. |
@joelcolucci Is memory leak issue resolved now? I have to convert HTML to Delta on nodejs server side. So i need this package to implement on node side |
Hi all, thank you for your patience. I am dedicating some time this week to revisit this issue. Will update soon. |
Hi all! Just published version ^0.3.3 which improves memory usage and prevents the module from hanging on import. It looks like Quill's |
@joelcolucci |
Unfortunately, in my testing, there is still a memory leak. I updated to version 0.3.3 and let the node server run on the server. It took about 2 days, but the memory usage kept increasing until it ran out of memory. |
@extremerotary Thanks for the feedback. In my testing I noticed that a potential leak occurs when calling Quill.setContents. Quill might have a circular reference preventing the garbage collector from cleaning things up. I'm away this weekend but will dive back in next week. Are you using this in a web application or an ETL pipeline? |
@joelcolucci |
I experienced the same issue after including the module in a nodejs app. I use it to convert quill delta to HTML. See memory usage in blue:
At the moment, I simply require the module like so: |
Hey @Trunksome, thanks for letting me know. I'm backed up work up at the moment. I'll try and spin up a long running process and see if I can replicate, isolate this issue. |
Hi @joelcolucci really nice work on this project! |
I ended up closing this library and wrapping everything in a class (thereby only creating a JSDOM when needed) and calling
once i'm finished with the converter. |
Memory usage went from 60MB (normal) to 450MB over 9 hours by simply including the module:
const quillConverter = require('node-quill-converter');
The text was updated successfully, but these errors were encountered: