Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question LLVM update needed for WebGL build.?

Discussion in '2022.2 Beta' started by progsung, Nov 5, 2022.

  1. progsung

    progsung

    Joined:
    Jan 17, 2016
    Posts:
    2
    Recently I struggled webGL build poor performance at unity 2022.2.0b13.
    I was monitoring windows task manager and wasm-ld was running strangely for a long time with very low cpu usage rate. (about 50 minutes)
    My test environment is windows11 on i7 laptop and test project is one of unity official ecs samples.
    - https://github.com/Unity-Technologies/EntityComponentSystemSamples/tree/master/HybridURPSamples

    I searched wasm-ld and llvm, etc.
    I found a github issue. It is about llvm regression and fix at llvm version 15.0.2.
    - https://github.com/llvm/llvm-project/issues/57664
    I checked webGL Build Tool’s llvm in unity editor installed folder. It’s version 14.x.x.
    So I tried llvm replacement with latest 15.0.2. then ran web build again, and pretty faster than before.
    I’m not sure it was fixed unity web build performance issues, but update llvm toolset more latest is worth a try i think.
     
    Last edited: Nov 5, 2022
    echu33 and DrViJ like this.
  2. DrViJ

    DrViJ

    Joined:
    Feb 9, 2013
    Posts:
    158
    My builds take more than 2 hours on 2022.2, that's unacceptable for any iterations :(

    did you just replaced the LLVM in Unity folder?
     
  3. echu33

    echu33

    Joined:
    Oct 30, 2020
    Posts:
    62
    Encounter this issue too. do you mind share how to fix this?
     
  4. progsung

    progsung

    Joined:
    Jan 17, 2016
    Posts:
    2
    Sorry for the late response..

    * my test:(llvm replace)
    - download llvm win-x64 release: (LLVM-15.x.x-win64.exe from https://github.com/llvm/llvm-project/releases )
    - install llvm
    - backup original unity webgl's llvm tool folder: ex. llvm_backup
    - copy downloaded llvm bin folder to unity webgl's llvm folder
    - unity editor webgl llvm location(my case) : C:\Unity\2022.2.0b13\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm

    !!Caution it is not recommended for production !! just test case not sure runtime issue.

    I hope it can help someone.

    thanks.
     

    Attached Files:

    echu33 likes this.