Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Discussion (2023.2.0a10) WebGL Build Time & Build Size

Discussion in '2023.2 Beta' started by KamilCSPS, Apr 14, 2023.

  1. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    450
    Concerning;

    WebGL: Added Player build options for WebAssembly language features: BigInt, WebAssembly.Table, and experimental native C/C++ multithreading. In addition to generating smaller code size, enabling both BigInt and WebAssembly.Table features improves the build times of Development builds.


    Understanding this is supposed to improve development builds [...]

    Our tests show no build size improvements compared to 2022.2.x for non-development builds (build size improvements are quite irrelevant in development builds). Is that intended?

    Overall, we are seeing a regression between 2022.2.x -> 2023.2.x in build size and build times.

    Also referencing; https://forum.unity.com/threads/web...asm-takes-forever.1315203/page-2#post-8944182

    Some Stats --- Ryzen 7950X, DDR5 6000 - 64GB, Samsung 980 Pro 1TB.

    Current project - Unity 2022.2.9;
    - Optimize For Build Time: 7.45MB player size, clean build time of 85 sec followed by an incremental (1 line change) build time of 66 sec.
    - Optimize For Build Size: 6.55MB player size, clean build time of 153 sec followed by an incremental (1 line change) build time of 136 sec

    Looking at future trends - Unity 2023.2.0a9;
    - Optimize For Build Time: 7.55MB player size, clean build time of 95 sec followed by an incremental (1 line change) build time of 70 sec.
    - Optimize For Build Size: 6.89MB player size, clean build time of 173 sec followed by an incremental (1 line change) build time of 152 sec

    Looking at future trends - Unity 2023.2.0a10 + BigInt & WebAssembly.Table;
    - Optimize For Build Time: 7.55MB player size, clean build time of 91 sec followed by an incremental (1 line change) build time of 67 sec.
    - Optimize For Build Size: 6.92MB player size, clean build time of 168 sec followed by an incremental (1 line change) build time of 149 sec
     
  2. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,237
    I would like to know if WebAssembly.Table has anything related to externref feature of webgl. Or are there anything that related to interop with javascript object

    There was also embind feature in emscripten that should have setting or dependencies checking supported in unity