[Webkit-unassigned] [Bug 256703] [iOS] Wasm based WebApp readalong.google.com reproducibly jetsams

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 22 20:15:38 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=256703

--- Comment #36 from Justin Michaud <justin_michaud at apple.com> ---
I have looked further into this.

150mb - wasm tables, element sections, as you previously identified. 
- We need to optimize this so that we don't need to generate so many wasm to js wrappers, and so that we can collect them. There is no ETA on that, but we know we need to do it.

WORKAROUND: don't put functions in tables if they aren't used, and don't put data in element sections if it isn't used.

60mb - Interpreter bytecode
120mb - JIT memory

We should be able to collect these before you jetsam, and we have a separate bug about that. We know we need to do that.

WORKAROUND: try building with Os if you aren't already, and measuring if that meets your performance needs.

Thank you for filing this bug. This is a super helpful test case.

I was not able to find a single smoking gun that explains the memory usage difference, but rather many small wasm memory inefficiencies. I will try to work on these in the future, but unfortunately that leaves nothing actionable for you right now. If you can reduce the size of your wasm Table and Memory, then perhaps you can get under the jetsam limit. 

The non-wasm version seemed pretty usable and used substantially less memory, so if shipping that is an option for now, that might be the fastest fix on your end while we work to improve our wasm memory usage in future releases.

I will come back to this bug from time to time to update you on any improvements that land.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230623/20fd62fc/attachment.htm>


More information about the webkit-unassigned mailing list