We do streaming baseline compilation as fast as the network can hand us bytes, but we also kick off a more optimized compilation in a background thread.
A lot of optimizations can be baked into the generated wasm, but you still need to spend some time doing eg register allocation.