Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

WebGL loads painfully slow at 20% of our users

Discussion in 'WebGL' started by GeertCF, Aug 29, 2016.

  1. GeertCF

    GeertCF

    Joined:
    Aug 27, 2015
    Posts:
    4
    We have a WebGL project on http://cf3.curvefever.com

    We can see that about 80% of our users either load the game, or get an error. However, 20% of our users never finish loading the game. After talking with some of the users, they tell us that their browser hangs for over 5 minutes.

    We are now wondering how we can fix this issue.

    We have build it in release mode, Exception level to Explicitly thrown exceptions only (can't put it on none)
    The files are gzipped, gzipping is enabled on our server
    The build is loaded in 96 MB
    The file sizes are:
    • datagz (3.2MB)
    • jsgz (6.9 MB)
    • memgz (612 KB)

    What can we do to make people hang less? How to detect what our problem is? Can we split up the project
     
  2. mikaelwallen

    mikaelwallen

    Joined:
    Jun 3, 2016
    Posts:
    56
    Hi.

    What browser are they using? We have found IE11 to be very slow and Unity even says it is not officially supported. I actually tested to run your game and found it to startup quite fast in Firefox but much slower in IE11. It was not 5 minutes though. However, machine spec should also influence this. Do you know if these users have very slow machines?
     
  3. GeertCF

    GeertCF

    Joined:
    Aug 27, 2015
    Posts:
    4
    They use all kinds of browsers. The average load time for people who finish the loading is 24 seconds. On average, people close the page after 84 seconds if it doesn't load.

    That is unacceptable for any web project off course.
     
  4. stephanwinterberger

    stephanwinterberger

    Joined:
    Aug 22, 2016
    Posts:
    27
    We have the same problem. We are loosing almost 20% of our users although we prevent users with old systems to load the Unity scene. So no mobile users and no pre IE11 users and still we lose so many users. Our WebGL build is quite optimized but there is still 25mb of JavaScript left (this is because we need some parts of the physics engine). Our main problem is the initial parsing of the huge JavaScript file. The whole browser is blocked and the user thinks the page is frozen and just closes the tab. I'm pretty sure that the problem is directly related to JS file size and CPU speed. If you have a fast CPU the parsing is much faster and the browser does not freeze for so long. You can try this with the latest Chrome Canary. There is a throttle for CPU speed. If you throttle your CPU speed, you can feel the pain of users with mid-range hardware. Are there any tips/tricks how we can make our WebGL build accessible for users which do not have top-notch hardware?
     
  5. GeertCF

    GeertCF

    Joined:
    Aug 27, 2015
    Posts:
    4
    Stephan is right. It is exactly our experiences. Also it has nothing to do with the browsers, as it happens all over the board for all browsers and all browser versions. This is for the chrome users (70% of our site users use chrome)

    This is an excerpt of our players having a problem with slow loading:
    http://imgur.com/O69vG0F