cornerstonejs / cornerstone3D

Cornerstone is a set of JavaScript libraries that can be used to build web-based medical imaging applications. It provides a framework to build radiology applications such as the OHIF Viewer.
https://cornerstonejs.org
MIT License
576 stars 297 forks source link

Cache can be deleted, but memory of browser not #585

Open alex644715 opened 1 year ago

alex644715 commented 1 year ago

There is a function in my program that I need to switch between different series in one study. I already applied cache._decacheVolume(volumeId), destroy everything I could. Then I console logged the cache, it showed cache is empty. However I found that the memory of task manager of Chrome wasn't reduced, but still increased. I think it's the memory leak. Do you have any good news for this?

sedghi commented 1 year ago

Can you share some screenshots? you probably should do cache.purgeCache

alex644715 commented 1 year ago

I used cache.purgeCache too, but it's same.

I also found when try to appied _decacheVolume or purgeCache, the BaseStreamingImageVolume.js is running volume load cancel function, the render cannot work until the cancelling finished.

image
alex644715 commented 1 year ago

In the end of this video, memory of browser goes above 2GB

https://user-images.githubusercontent.com/61206468/235350102-57f9515c-f9ad-4b08-9a6b-e426c2682b06.MP4

sedghi commented 1 year ago

hmmm, can you share a bare minimum repo?

alex644715 commented 1 year ago

Do you mean DICOM files or something?

pzq123456 commented 1 year ago

May be the repository that can easily reproduce this bug.

consoleLogNull commented 11 months ago

@alex644715 I have encountered the same problem as you. Have you resolved it? Can you tell me how it was resolved

sedghi commented 11 months ago

Please share your minimal example showing this as a zip file or some code. You need to call the purgeCache

consoleLogNull commented 11 months ago

@sedghi This is my minimal example, you can see it in the attach files my-minimal-example.zip

sedghi commented 10 months ago

I tried an it is a video instead of code