You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a React component which uses cornerstone 3D for a viewer interface. I am fetching a study from an Orthanc server and displaying the images. I am using purgeCache() and I am destroying all created volumes in ComponentWillUnmount. However, I have noticed two things. If I load the webpage that contains the component, the JS heap size shoots to around 30 Mb. This is to be expected. If I refresh the page, the heap size temporarily shoots up to around 55-60 Mb but then comes back down to 30 Mb. This is probably the browser garbage collecter's doing (or maybe something else).
If I redirect to a different route in my web app and open the page with the component again, it shoots up to 60 Mb and stays there for quite some time (roughly 15 minutes) before it unloads previous memory and comes back down to around 30. I am using Brave.
Is this an issue with how I'm unloading the cache? or maybe something in my web app? I am just caching the image metadata and the volumes that get created. Ideally, the unmount function should run whenever I go to a different route.
Any help would be appreciated.
Steps to Reproduce
I cannot give steps to reproduce without giving all of my code. I will post some snaps of the memory size before and after.
When first loaded:
After redirecting and opening page again:
The current behavior
Memory is taking too long to unload when I redirect and come back to the interface.
The expected behavior
I am purging the cache so it should come back down to around 30 Mb quickly.
OS
Windows 10
Node version
v20.14.0
Browser
Brave
The text was updated successfully, but these errors were encountered:
Describe the Bug
I have a React component which uses cornerstone 3D for a viewer interface. I am fetching a study from an Orthanc server and displaying the images. I am using purgeCache() and I am destroying all created volumes in ComponentWillUnmount. However, I have noticed two things. If I load the webpage that contains the component, the JS heap size shoots to around 30 Mb. This is to be expected. If I refresh the page, the heap size temporarily shoots up to around 55-60 Mb but then comes back down to 30 Mb. This is probably the browser garbage collecter's doing (or maybe something else).
If I redirect to a different route in my web app and open the page with the component again, it shoots up to 60 Mb and stays there for quite some time (roughly 15 minutes) before it unloads previous memory and comes back down to around 30. I am using Brave.
Is this an issue with how I'm unloading the cache? or maybe something in my web app? I am just caching the image metadata and the volumes that get created. Ideally, the unmount function should run whenever I go to a different route.
Any help would be appreciated.
Steps to Reproduce
I cannot give steps to reproduce without giving all of my code. I will post some snaps of the memory size before and after.
When first loaded:
After redirecting and opening page again:
The current behavior
Memory is taking too long to unload when I redirect and come back to the interface.
The expected behavior
I am purging the cache so it should come back down to around 30 Mb quickly.
OS
Windows 10
Node version
v20.14.0
Browser
Brave
The text was updated successfully, but these errors were encountered: