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

Multithread version doesn't seem to work on WebKit-powered browsers (like on iOS) #6

Open
pmarreck opened this issue Dec 16, 2022 · 6 comments

Comments

@pmarreck
Copy link

pmarreck commented Dec 16, 2022

Impressive work! I tried it on various browsers, even the multithread version worked on anything modern BUT webkit-powered browsers (such as, unfortunately, ALL browsers on iOS). Is there a way to do multithread on webkit? (The non-multithread does seem to work fine.)

@niutech
Copy link
Owner

niutech commented Dec 17, 2022

Which version of iOS/Safari? I don't have iOS devices, could you debug Safari on iOS and check what's the error in web inspector?

@pboiski
Copy link

pboiski commented Dec 30, 2022

I tried with Epiphany and it gave me the following error:

Screenshot_20221230_093149

@niutech
Copy link
Owner

niutech commented Dec 30, 2022

It means that SharedArrayBuffer is not available in this browser - see the browser support - you have to use the single-thread version, I cannot do much with it.

@pboiski
Copy link

pboiski commented Dec 30, 2022

Ah, how stupid of me. I did manage to get webinspector going in the mean time.
Tried it with an iPhone 6s running 15.7.2 and an iPhone X running 16.2.
Both gave me the same error when browsing the multithreaded demo page:
Schermafbeelding 2022-12-30 135335

@niutech
Copy link
Owner

niutech commented Dec 31, 2022

It seems that iOS has strict limits for allocating memory for WebAssembly. I don't have Apple devices to test it, but what if you decrease values in new WebAssembly.Memory({initial:ep/65536,maximum:32768,shared:!0}) in jxl_decoder.min.js (ep=104857600)?

@pboiski
Copy link

pboiski commented Jan 2, 2023

Setting ep=26214400 and initial:ep/8192,maximum:16384 will get the demo page loading with no issues for me.

I also tried with a larger 2MB image but that wouldn't load on single or multi threaded (and gave no errors whatsoever).

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

3 participants