WebGL build "linking build.js (wasm)" takes forever

Has anyone heard anything on this bug? The emscripten substitution did not work for us. We are having to run the WebGL build overnight :frowning:

I’m also having this problem. It takes a long time to build. Hope unity will fix it.

Same issue, I’ve moved back to 22.1.24f1 to resolve. If I get time, I’ll try and slim down my project to do a bug submission, but please do pop up the link when you get it, @BlackSpider

Same issues here. 2+h build time is simply not workable in a dev process… we are stuck with 2022.1.24

Seems that it will be fixed in 2022.2.3 or 2022.2.4

1 Like

Any idea when 2022.2.3 will come out?

Guessing in 2 weeks

Seems not fixed in 2022.2.3

Guess we need to wait 2022.2.4 ?

2 Likes

Hmmm it does say resolved in 22.2.3 in the issue tracker.

Is that a cold or warm build?
Maybe make a new report with 22.2.3 to be sure if it’s a warm build?
If you link the previous issue on the tracker they can check what to update etc

DevDunk what is a cold or warm build?

Damn i was eager to upload a build now that o got my server running but ran into this :frowning:

Something is “cold” if it’s being done from scratch. A cold start of the power grid would happen if there was a complete blackout, for example.

So, a cold build happens if you’ve completely cleared all of Unity’s temporary files – it has to do everything from scratch, which takes longer.

The opposite is “warm”. Unity has already done a bunch of the work; it just needs to work on things that have changed since the last build.

CORRECTION 2022.2.2.3f1 has fixed the issue !!!

1 Like

I’m getting this issue in 2022.2.3f1

1 Like

WebGL builds as of 2022.2.3f1 now take about 7 minutes for me (vs. 20 minutes previously). If I haven’t changed any code it’s about 1 minute. Windows 10, Ryzen 7 4800H, SSD, 16GB RAM.

Edit: 4f1 seems even faster, taking just 3-4 mins after code changes… swoons - at least for me it’s the fastest it’s ever been, for as long as I’ve been using the engine (i.e. 2019.x).

1 Like

After switching to 2022.2.4f1 from 2022.2.0b16 my build time is now 59 minutes (up from 32 minutes).

Are you optimizing for runtime speed or build size?

The quick answer is that I thought it was being set for runtime speed, but it’s actually been for build size/shorter time. These are what is displayed:
8764051--1188352--a.png

In my automated build process (i.e. not using the dialog), I set to the above Master and Faster runtime for WebGL release builds shown above by doing this,

PlayerSettings.SetScriptingBackend(EditorUserBuildSettings.selectedBuildTargetGroup, ScriptingImplementation.IL2CPP);
PlayerSettings.SetIl2CppCompilerConfiguration(EditorUserBuildSettings.selectedBuildTargetGroup, Il2CppCompilerConfiguration.Master);
PlayerSettings.SetIl2CppCodeGeneration(UnityEditor.Build.NamedBuildTarget.WebGL, UnityEditor.Build.Il2CppCodeGeneration.OptimizeSpeed);

However, in Build Settings dialog, the dropdown there says “shorter build time”.
8764051--1188355--b.png

So I manually changed it to “Runtime Speed” and then ran the automated process again (with there being code changes since my previous build) and it took 32 minutes. Made more code changes and built again, still on “runtime speed”, and again it took about 32 minutes. Then I changed it to “Shorter Build Time” again, made more code changes, and it took less than 3 minutes (I’m currently using 4f1).

I came to realize that while my script is setting Player Settings->Other->Configuration properties as expected, that dropdown shown above doesn’t change as well… and I can’t figure out how to do it procedurally, the 3rd “Disk Size” option isn’t displayed for UnityEditor.Build.Il2CppCodeGeneration enum code completion, so there must be another enum (?) and something else that needs to be done to handle this dropdown (…do you have any idea ?)

Finally, as I’m not sure how long this has been the case (that dropdown overriding SetIl2CppCodeGeneration) and don’t have 2f1 or earlier installed anymore, I don’t know if a) I’ve been on “shorter build time” for a while without noticing and that path just got much faster… and performance of builds made with it is just reasonably comparable to “runtime speed”, or b) it’s been compiling for “runtime speed” pre-3f1 and somehow doesn’t now without also setting that dropdown in 3f1+… in which case that path is now slower, confirming what you’ve said.

Still isn’t fixed in Unity 2022.2.4f1

8771401--1190074--upload_2023-2-1_0-6-59.png

If you have a project which is in both versions with and without the bug, make a big report and attatch both projects

Looks like 2022.2.5 resolved both WebGL and IL2CPP build issues. Build times are back to normal.

1 Like