Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Performance issues with the Unity web player

Discussion in 'Editor & General Support' started by amirabiri, Mar 10, 2012.

  1. amirabiri

    amirabiri

    Joined:
    Mar 10, 2012
    Posts:
    11
    This issue started as a question I've posted on Unity Answers, but the nature of the discussion is no longer suitable for Q&A format so I have moved it here.

    To re-iterate the issue:

    The Unity web player appears to suffer from a severe scalability/performance problem under certain circumstances. These circumstances are a combination of:
    • Mulitple instances of the web player on the same web page.
    • Scrolling the contents of the browser window, i.e with the mouse wheel or using the scroll bar on the side.
    • The type of browser.
    • Hardware profile.
    I have set up a test web page on my server so that different users may test it and report their findings and we might all benefit from a somewhat wider range of test data. If you come across this problem or find this topic useful please pop in and try the test and report back in this thread your results so that I may add them to the results table.

    Click here to go the test page.

    On my machine which is an Intel E6420 / 2GB RAM / GeForce 8800 GTS / 32bit Windows 7, I was barely able to run 4 instances of the player on FF 3.6 and IE 8 and Chrome became unresponsive. With 12 instances Chrome hangs, IE crashes and in Firefox one of the instances of the player crashed and the others went on with very low frame rate.

    I would like to clarify that the issue here isn't of a game-in-the-browser scenario. Our intention was to provide a rich content experience to users of our website with several rotating and interact-able 3D models in places where traditionally a static non-interactive image would appear. To this end we created a very simple project with almost no logic (simple mouse rotation or slow spin if idle) with very low-poly / small texture models.

    This type of scenario also implies that we cannot assume our users will have high-end machines or necessarily have all their drivers fully up-to-date. We had hoped that the low quality of the models would address that and would be suitable to low-end machines (which they are outside the context of the browser's / web-player).

    If you are concerned about the web player's performance on a page where there is only one instance of the player with no scrolling of the browser window (i.e the game-in-the-browser scenario) - this topic won't give you any useful information. The problem described here is not relevant to that scenario.
     
  2. Morning

    Morning

    Joined:
    Feb 4, 2012
    Posts:
    1,141
    How about converting to flash instead? Overall webplayer is not a good idea to use as a website decorator.
    On my setup for example a single window will make my browser act crazy, unresponsive or ignore the cursor. Sometimes I even have trouble closing the tab when a webplayer is running since firefox won't respond to clicks and yet the game runs fine.
     
  3. amirabiri

    amirabiri

    Joined:
    Mar 10, 2012
    Posts:
    11
    This is exactly the course of action we were planning to take for now. However it is a shame because:
    1. The Unity web player loads much faster than Flash. It can take Flash up to 7-8s to start.
    2. The web player build is far smaller. An empty Flash build starts from 1M. In web standards that's a huge asset. An empty web player build weights 1k. With our low-poly models we were able to get a 250k web player build. That same project was a 1.5M Flash build.
    3. Flash is notorious for its sub-optimal performance. And indeed with a single instance, the web player's performance is better than that of the Flash build.
    4. For the time being, it is far easier to interact with the web player from the browser's JS and far easier to tweak its loading screen. This might be because the Flash build is still in preview state or might stay like that. I have not been able to find answers to these questions online so far.