Over 7 minutes! For a fairly small, simple project. That’s in Unity 2022.3.12 on a Mac Studio (M1 Max, 32 GB), macOS 14.1.1. That seems a bit excessive to me. I haven’t done anything for WebGL for a while, but I don’t recall it taking nearly so long on my old Intel iMac. Occasionally, the build finishes quickly, but it doesn’t seem to have anything to do with the changes I’ve made since the last build.
WebGL builds use IL2CPP so you experience the kind of compilation a C++ developer would. It’s normal, unfortunately. Fortunately, incremental builds will be faster. You also have the option to optimize for build time rather than runtime speed or size, which helps a bit.
Get a dedicated PC AMD 7900X CPU or better it won’t take as long. Also a 4090 GPU for faster baking. If you are Mac maybe M3 Max?
Well, I have buildtimes of over an hour (when not set “shorter build time”). So consider yourself lucky
set enable exception option in publisher settings to none or full without stacktrace can make significant less build time.
For me using Unity 6000.0.1f1 it was resulting in a blue screen crash after over half an hour and eating up all the ram. Doing as you said + setting optimization to shorter build time made it build in less than 10 minutes.
I had successful builds couple years ago with unity version 2021 i assume and the size of the build was 8.71 mb, with these settings it’s 15.7 mb. Almost twice but better than nothing.
Idk if it’s unity that is degrading or the wasm builder, or standard’s changed