First thing, I would try -O2 and -Os. They can be much faster than -O3 and -Oz.
Otherwise, 10-12 minutes sounds extreme even for 12MB, so this is likely hitting an unknown bad case. If you can run a system profiler on it that might show something useful. You can also run with BINARYEN_PASS_DEBUG=1 in the env, which will list times of passes - perhaps one particular pass will be slowest. On Mon, Nov 21, 2022 at 11:19 AM Александр Гурьянов <caiiiy...@gmail.com> wrote: > Hi, I added dosbox-x as backend for js-dos it's size is ~12Mb, wasm-opt > requires 10-12 min to optimize it (-Oz). Do you have any advice how to > speed up it? If I build with -O0/1 I have following error in chrome: > > > ‣ > <http://localhost:8080/test/test.html?grep=dosboxXWorker%5C.common%20dosboxXWorker%20can%20track%20extract%20progress> > > CompileError: WebAssembly.compile(): Compiling function > #6485:"CPU_Core_Normal_Run()" failed: local count too large @+4790225 > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to emscripten-discuss+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/CAKOm%3DVH02jeZ70pHAe%2BvTL26ScOato8r7b_UBW_V34mJvGwt_Q%40mail.gmail.com > <https://groups.google.com/d/msgid/emscripten-discuss/CAKOm%3DVH02jeZ70pHAe%2BvTL26ScOato8r7b_UBW_V34mJvGwt_Q%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpRWo88FyDPWU3eF%3DH_ze8owRu2EgNpptYvKmFD6FHgoVg%40mail.gmail.com.