optimize emscripten compilation