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. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

SRP framerate in editor vs standalone

Discussion in '2018.1 Beta' started by Elecman, Feb 28, 2018.

  1. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,369
    The frame rate reported in the Editor (stats window) and also the frame rate computed by a custom script is significantly slower than in a standalone build. I am talking 120 fps in Editor and 1000 fps in standalone. Is this a known issue?
     
  2. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,613
    What does the profiler tell you is taking the time?
     
  3. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,369
    2018b9:
    DoRenderLoop: 44%
    EditorOverhead: 25%
    Profiler.CollectGlobalStats: 16%

    2017.2:
    Camera.Render: 68%
    Overhead: 7%
    Profiler.FinalizeAndSendFrame: 5%
     
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,419
    It's probably more helpful to have these numbers in absolute milliseconds, since % highly depends on everything else.
     
    superpig likes this.
  5. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,369
    Anyway, it doesn't really matter. Previously the reported Editor frame rate was highly inaccurate and now with Unity 2018 it is incredibly inaccurate.
     
  6. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,106
    Was the performance difference significantly smaller in previous versions? If so, please submit a bug report with a minimal reproduction case and reply in here with the case #.
     
  7. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,369
    Only when "maximize on play" is selected, the FPS used to be almost the same as with the standalone when using Unity 2017. But that is not the case anymore either. I will see if I can make a small repo.
     
  8. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    If you are building for standalone (mac, win, linux), running the game in the editor consumes more resources than running it as a standalone program, which can explain the difference. When e.g. you have the game view panel alongside scene scene panel open in the editor and hit play, your resources must render the game view and the scene view = double effort, since you effectively render the game with at least two cameras ( or even more, depending on your setup). It seems as expected behavior, not a bug.
     
  9. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,369
    Thanks, I know that. The point is that the difference is way greater with 2018 then with 2017.
     
  10. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    I see what you mean.
    I had a little go with the shaders in the lightweight pipeline, they do not seem so lightweight - 3 passes for the simlpest shader in the shader graph.
    Maybe with some examples regarding effective use of the new pipeline we could appreciate its benefits better, right now it seems slow.
     
    Last edited: Mar 8, 2018
  11. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,106
    That would help a lot, thanks.