-
Notifications
You must be signed in to change notification settings - Fork 107
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 in node-linkedlist #601
Comments
Thanks. The project hasn't been touched in years and uses some outdated APIs. I think I'll inline it and apply the changes. |
Looks like only Array like methods (push/shift/length) are used on _queue. As a quick fix I replaced this._queue = new LinkedList(); with this._queue = []; in class Connection (connection.js). |
@breakbild the problem is that unintuitive as it may seem, LinkedList is significantly faster than native array operations. I tried replacing it but the slowdown was noticeable when performing a large number of queries at the same time. |
I merged master and the pull request #609 is conflict free again. I also updated my library. I'm still using my linkedlist branch in production environments to override the broken linkedlist implementation, which should not be the way to do things. Please let me know if I can help somehow. |
Newest arangojs version 6.13.0 https://github.com/arangodb/arangojs/releases/tag/v6.13.0 is having a patched memory leak arangodb/arangojs#601
Hey there,
I created a pull request ( kilianc/node-linkedlist#7 ) for node-linkedlist quite some time ago, but it's not accepted yet and it seems the project is not very active.
The package has a memory leak that I found because I'm using arangojs. On shift(), the reference to the old head is not removed, thus keeping all old heads as long as there's pressure on the queue.
You might want to integrate the whole library (with my fix) or switch to another implementation.
Hope you can fix this soon, so I can drop my workaround github dependency.
The text was updated successfully, but these errors were encountered: