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 #62
Comments
@gitgitwhat thanks for bringing this up. I think the issue is when removing objects from the scene, three.js doesn't fully liberate the memory. I've added a few Please try it ( |
There seems to be an improvement but still a leak. It takes a little longer to increase but it still steadily goes up. I'm curious if adding new objects to a group via .nodeThreeObject() is an issue. I'm going to do some tests and try to isolate the possible leak and let you know. |
Ok, please let me know. I'd be curious to see if not using a I've also tried running a series of update cycles with the |
It seems that if you add anything to the group beyond the mesh then you have the leak. The more objects you add to the group causes the memory to increase faster. This seems to be the case with both Group and Object3D as the containers.
|
I know you are busy @vasturiano but have you had any luck in figuring out this leak? My JS skills aren't that great and haven't been able to identify what's going on. |
I haven't had the chance to look deeper into this @gitgitwhat. The object renderer is deallocating groups recursively here. I was hoping that would fix all the leaks, but it seems there's still something left, possibly internally to |
@gitgitwhat from my observations it is best to load all nodes/links at once. As You said every new addition does redraw rest of objects leaving some leaks. Second; |
I was wondering if there is any good solution to the memory leak issue since then? |
any updates on this? |
I have solved this issue by attaching my objects to node.__threeObj; using three.js syntax. |
@zzggyy1 Hi, thanks for the answer. |
Iterate through nodes and attach a three.js object to each of them.
|
I don't think this is a 3d-force-graph issue but probably more of an underlying three.js one however I'm hoping you can offer some advice. I notice that if I let my auto-updating graph run, eventually I run out of RAM. The browser memory footprint gets so large that it crashes. I've tested this in both Firefox and Edge. I know Javascript is supposed to have garbage collection but something is being held on to cause the memory to just increase. Any thoughts?
The text was updated successfully, but these errors were encountered: