cornerstone3D icon indicating copy to clipboard operation
cornerstone3D copied to clipboard

iOS memory limit problem

Open articu opened this issue 2 years ago • 10 comments

Describe the Bug

Web app built with cornerstone3D library in iPhone and iPad keep refreshing.

iOS have certain memory limit for an app/webpage. Now my webpage with more than 300 dicom image files would refresh constantly because of exceeding the memory limit of iOS. This problem does not exist in Android, Windows, and Mac. It only occur in iPhone and iPad.

Steps to Reproduce

In iPhone and iPad, open any webpage built with cornerstone3D library with more than 300 dicom image files in on series.

The current behavior

My webpage with more than 300 dicom image files would refresh constantly because of exceeding the memory limit of iOS.

The expected behavior

My webpage do not refresh.

OS

iOS 14.8

version of @cornerstonejs/core

0.28.0

Node version

16.14.0

Browser

Safari 15.1.0

articu avatar Oct 19 '23 15:10 articu

Are you using volume viewports and volume rendering or simply render images?

sedghi avatar Oct 20 '23 13:10 sedghi

@sedghi Only render images. Can you please help me ? It is a extremely serious problem in production and a lot of our users are affected by this problem. Thank you very much.

articu avatar Oct 21 '23 07:10 articu

are you on ios 17?

sedghi avatar Oct 25 '23 14:10 sedghi

@sedghi I have tested in iOS14.8, 16.6.1, 17.0.3. The problem occurred in all of these versions.

articu avatar Oct 26 '23 03:10 articu

Can you test again with latest iOS?

sedghi avatar Jan 10 '24 13:01 sedghi

I created this PR which would be good enough for a lot of use cases (except the PT Scaled data)

https://github.com/cornerstonejs/cornerstone3D/pull/1212

sedghi avatar Apr 17 '24 20:04 sedghi

@sedghi Thank you very much. I have tested again using latest cornerstone3D with latest iOS. It is better, but the refresh problem still exist. More than 300 dicom image files would trigger the page refresh before. Now more than 600 dicom image files would trigger the page refresh.

Can cornerstone add disk cache instead of only memory cache so that memory is no longer an issue? Large image series is very common in real world application. Thank you.

articu avatar Apr 29 '24 09:04 articu