Search Unity

Question Why Does a WebGL Build Take SOOOO Long?

Discussion in 'Web' started by John-B, Dec 16, 2023.

  1. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,262
    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.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,838
    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.
     
    John-B and De-Panther like this.
  3. vriog

    vriog

    Joined:
    Dec 6, 2014
    Posts:
    31
    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?
     
  4. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    Well, I have buildtimes of over an hour (when not set "shorter build time"). So consider yourself lucky :)
     
    John-B likes this.