-
Notifications
You must be signed in to change notification settings - Fork 3.4k
CompileError: WebAssembly.instantiate(): size 8279546 > maximum function size 7654321 #16690
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
What seems to resolve this for me is to enable |
I guess lto might manage to reduce that function below the maximum size browsers allow. In general, you can disable inlining on functions that end up huge like this, or build that file with |
Thanks for your reply. I did use |
There have been some thoughts about function splitting and outlining, although for other purposes, but it could help here too. I think it's definitely feasible, if someone has the time, but it may not be easy (when splitting you need to pass around all relevant locals, and in such a huge function I worry you'd hit browser limits on the # of parameters/returns. Spilling to memory might help, but that could be extremely slow). |
Great to hear that you have this on the radar already / still. Since this is not urgent for me any more, I will close this issue. |
I'm encountering the error
at WASM startup when setting
-sDISABLE_EXCEPTION_CATCHING=0
and-O3
in my project. Is there anything I can do about this error?The text was updated successfully, but these errors were encountered: