Open wpmed92 opened 7 years ago
Thanks for the report. I'll try to look into this.
Thank you. Looks like the ArrayBuffer somehow survives in createNifti1Data? Not sure though.
"But when I load a file again, the callback stays on the heap and is never collected. " this one seems to be firefox specific, not present in chrome. viewer.clearVolumes() bug is present in both
I'm having similar issues. Any word about progress on this?
It is my understanding (someone please correct me if I am wrong) that @rdvincent is occupied with other work for the foreseeable future, and @natacha-beck is on maternity leave through the summer. Please chime in if anyone else in working on this...?
Hello!
I really like your library I use it one of my projects. I need really fast garbage collection because they'll use my application in a clinical environment, but the extensive usage of callbacks in your lib results in slow GC, and in some objects not being collected at all. I found that after calling viewer.clearVolumes() the TypedArrays allocated are actually never freed, which results in out of memory error when loading and reloading lot of files. Also in nifti1 the loadFromFile's callback is not always collected (so the arraybuffer 'sticks' in the GC chain). In Mozilla's Dominators view I see it being collected when loading file for the first time. But when I load a file again, the callback stays on the heap and is never collected. (Maybe it would've been collected but once I tested it wasn't collected in like an hour or so). The latter is pretty strange though. I attached screenshots, but you can test it on your machine.