Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of memory when loading CharLS/JP2K images on iOS #506

Open
Ouwen opened this issue Jan 14, 2023 · 3 comments
Open

Out of memory when loading CharLS/JP2K images on iOS #506

Ouwen opened this issue Jan 14, 2023 · 3 comments

Comments

@Ouwen
Copy link
Contributor

Ouwen commented Jan 14, 2023

It seems that iOS safari/chrome is has memory issues when loading both JPEG2000 and CharLS codecs. This might be related to #410.

The behavior is a bit unstable and sometimes does work. When it fails a generic "Range Error: Out of Memory" is thrown and requires safari force quitting to reload.

To reproduce on iOS, connect iPhone via the safari web debugger. Add host: '0.0.0.0' after the port: 3001 in webpack.

Open up the wadouri example and load a CharLS image then a JPEG2000 image. JPEG2000 should fail.
Refresh and load a JPEG2000 image then a CharLS image. CharLS should fail.

@Ouwen
Copy link
Contributor Author

Ouwen commented Jan 14, 2023

Updating to latest CharLS 1.2.1 seems to fix the memory problem on iOS likely due to the 50mb per codec memory change.

CharLS 1.2.1 is slower in desktop chrome browser, compared to older version.
CharLS 1.2.1 is quite performant on safari browser.

@sedghi do you know why this might be the case?

@sedghi
Copy link
Member

sedghi commented Jan 16, 2023

Hmm, I had plan this week to revisit this on WADO side to update all codecs to new one that I published recently.

How much worst is it in desktop chrome browser? and how did you benchmark?

@Ouwen
Copy link
Contributor Author

Ouwen commented Jan 16, 2023

For chrome, it is visibly worse but I didn’t formally benchmark. However, safari is able to run at around the speed of previous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants