Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question High CPU usage when not using decompression fallback

Discussion in 'Web' started by roka, Apr 15, 2024.

  1. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    602
    Hello,

    I migrate from unity 2019 to unity 2023 and i can observe a weird issue when i build my game without unity decompression fallback. My game have huge cpu spike and use a really high amount of CPU.

    If i use unity decompression fallback, the game do not have an high usage of CPU.

    I'm using on my server the web.config from (https://docs.unity3d.com/2023.2/Documentation/Manual/webgl-server-configuration-code-samples.html) :

    The game load fine without any console error but the game use a lot of CPU.

    If i use the unity decompression fallback, the game is running normally.
    I really do not understand why i can have a cpu usage difference because of the server or unity decompression.

    If someone have an idea.

    Thank you and have a good day.
     
  2. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,058
    dunno did the profiler help?
     
  3. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    602
    We can't profile when it's on the server.

    The issue there is that my game do not have any CPU issue when i use the unity decompression fallback but have a CPU issue when i use my server decompression fallback.

    I do not change anything in game i just tick/untick the check box "use decompression fallback" so even with the profiler, i'm not sure that it will give more informations.
     
  4. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,058
    well if it is truly related to the compression - you would see it locally on build and run - and be able to profile it.. if its not its your webserver.. so it tells you where to look either way