Open HemantPatel30 opened 1 year ago
@sedghi , Here is the comparison between firefox and chrome on active tab, for study contains 1203 image
Chrome memory : 1.3 GB Firefox memory : 842 MB Once new tab is opened, chrome memory reduces at reached near to 720 -750 MB , which is in-line with firefox.
https://github.com/cornerstonejs/cornerstone3D/assets/115255387/8edd6066-8c2a-4560-a964-aa8277bce7da
Could you kindly provide the data if it has been anonymized and you can confirm that there is no patient health information present in any of the headers or embedded within the pixel data?
@sedghi , I will try to get anonymized data but this happened with v3-demo server as well, below is recording for the same and study and series UID
const imageIds = await createImageIdsAndCacheMetaData({ StudyInstanceUID: '2.25.232704420736447710317909004159492840763', SeriesInstanceUID: '2.25.36253944465418474135239716841130807555', wadoRsRoot: 'https://d33do7qe4w26qo.cloudfront.net/dicomweb', });
https://github.com/cornerstonejs/cornerstone3D/assets/115255387/ae3730fa-890d-4004-9d8e-af8dd2e3ea7c
Describe the Bug
I was working on memory optimization for MPR loading of the study & with current example code base made below changes to reduce memory foot print on MPR,
Changes,
TestData, Two different study being used to capture this observation
OS, macos vertura chrome browser
Observation is that, Once volume is loaded and workers threads are terminated & app is stable --> at this point if we switch to new tab memory consumption in chrome task manager reduces by exactly size of the MPR volume.
in attached recording,
Example 1 : with study 1 (649 images) here is the break down of memory consumption in chrome,
https://github.com/cornerstonejs/cornerstone3D/assets/115255387/bc0d1db4-bf37-40bc-8f10-0c6f7c575980
Volume load in progress : 1020 MB After workers are killed : 815 - 804 MB When click on new tab : 462 MB ( Reduced by ~330 MB)
Example 2 : with study 2 (1203 images) here is the break down of memory consumption in chrome,
https://github.com/cornerstonejs/cornerstone3D/assets/115255387/37731f33-a7cd-4c17-a0e2-a0743254937b
Volume load in progress : 1.6 GB After workers are killed : 1.3 GB When click on new tab : 760 MB ( Reduced by ~550 MB)
Chrome hold/releasing memory when you switch to new tab but in that case it may be some fix memory, here it release the memory in proportion to volume size only. I have tried even smaller study contain 400 images & in this case it release the memory ~200 MB.
Steps to Reproduce
import { webWorkerManager } from '@cornerstonejs/dicom-image-loader'; in method, callLoadStatusCallback at end below code, if (webWorkerManager) { webWorkerManager.terminate(); }
The current behavior
it occupies lot more memory especially with MPR loading
The expected behavior
it should occupied memory as per the image size
OS
MAC OS 13.5.2
Node version
18.12.1
Browser
Chrome Version 118.0.5993.96