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

Low framerate in scene view with Alpha 21

Discussion in '2020.2 Beta' started by mjc33, Aug 21, 2020.

  1. mjc33

    mjc33

    Joined:
    Oct 9, 2019
    Posts:
    26
    I upgraded from Alpha 19 to Alpha 21 and now the scene view camera in my project down at about 20-30fps I would estimate, when it was smooth 60+ before.

    This persists even if I disable all the content in the scene and is independent of the size of the scene window, settings for the scene camera, gizmos enabled/disabled etc - nothing I tried has improved the framerate.

    The frame rate in game view after hitting play is unaffected at 120+ fps

    I tried loading another project and didn't have this issue but that is a much simpler project

    During the upgrade of my project to alpha 21 it stalled on importing the 'defaul't layout file for a long time (like 5 minutes+). I remember this happened previously when upgrading to alpha 15 from alpha 13. Then this time my system hard locked up when the Editor was loading at "execute menus" or something like that (but it loaded fine after restarting). I'm going to try deleting my project and reupgrading it from backup and will report back.
     
  2. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    I'm going to be upgrading my current project to a21 shortly. I have a particularly heavy prefab in this project that's typically got a consistent "just-under-60ish" feel while moving around editing, so I'll see how that performs vs. a19 and share my impression.
     
  3. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    Nope - if anything, a21 is a touch smoother for me. Is there any difference when you have something selected in the Inspector, vs. nothing selected at all? I had a similar issue a while back with editing suddenly being really low frame rate but it turned out to be related to that - once I clicked in a background and the Inspector emptied the frame rate went right back up.
     
  4. mjc33

    mjc33

    Joined:
    Oct 9, 2019
    Posts:
    26
    Yep it happens the same with nothing selected in inspector.

    I just tried re-importing from alpha 19 (PC didn't hard lock this time but it spent at least 5 minutes on ("initialize menus") and the issue still persists - so for now I'm sticking with 19 I guess. My project has been upgraded through every single version of 2020.1 Alpha and 2020.2 alpha so maybe it's related to that?
     
  5. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    Maybe - I should also create a new project from scratch and set everything up again.. I just don't want to miss some stupid setting and then spend forever trying to figure out what's not the same or why something is different now etc.. I've also been upgrading for ages and it has caused issues. Typical fix has been close Unity, delete Library folder, open Unity and let the re-importing happen that way. "Reimport All" isn't the same thing afaik so if you haven't tried that, back up your project and give it a shot? That has also been my go-to fix for when Play Mode takes 10X longer than it should, deleting Library folder for some reason (maybe just for me) gets in-editor performance back up again. I haven't isolated why, I do switch between platforms often and I generate/update/delete a lot of assets procedurally so maybe it's got something to do with that.
     
    Lex4art likes this.
  6. Deleted User

    Deleted User

    Guest

    Does this happen if you create a completely new empty project?
     
  7. Deleted User

    Deleted User

    Guest

    As far as I'm concerned, it does: 8 fps in a completely empty project on Linux.
     
  8. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,619
    You should be able to check with the Profiler if it's caused by user-code, 3rd party plugins or Unity.
    • Open Profiler "Window > Analytics > Profiler"
    • Switch the drop-down from "Playmode" to "Editor".
    • Change the drop-down from "Timeline" to "Hierarchy" in the bottom panel.
    • Hit the "Record" button
    • Do whatever is slow
    • Hit Record button again to stop recording
    • In the CPU graph select the slow sample
    • In the Hierarchy panel expand the all the nodes with the highest cost
    ... this should lead you to the cause. Please post a screenshot with all the relevant nodes expanded.

    If it's not showing what's causing it, you can enable the "Deep Profile" button and repeat the above steps. Deep Profile is significantly slower, but collects more data.

    Make sure "Frame Throttling" in the Preferences is set to a reasonable value, such as "16ms" or greater. Using low frame throttling values, or "Refresh Rate" if your monitor refresh rate is high like 120Hz, causes the editor to be slow(er).

    The Editor Iteration Profiler could also be useful:
    https://forum.unity.com/threads/introducing-the-editor-iteration-profiler.908390/

    If it's caused by Unity code, please submit a bug-report:
    https://unity3d.com/unity/qa/bug-reporting
     
    Last edited: Aug 21, 2020
    mjc33 and NotaNaN like this.
  9. BATTLEKOT

    BATTLEKOT

    Joined:
    Oct 2, 2016
    Posts:
    179

    At fresh created a21 project i have this physic spikes on default scene ....
     
  10. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,619
    What does the Hierarchy profiler view show, when you expand all the expensive nodes?
     
    mjc33 likes this.
  11. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Low frame rate on an empty project on Linux is a known issue. The fix is in review currently. Should be out in the next couple of builds.
     
    ROBYER1 and BATTLEKOT like this.
  12. Deleted User

    Deleted User

    Guest

    Ah, thank you for the info. :) I hope it will be soon fixed, I'm currently stuck to a15... :(
     
  13. mjc33

    mjc33

    Joined:
    Oct 9, 2019
    Posts:
    26
    Thanks for the tips on using the profiler - so I had a look into this again with the release of the Beta, the issue persists.

    It turns out I only get low FPS when moving the mouse (and maybe just when holding down a mouse button) - otherwise I have steady 200fps - below is a screenshot of profiler when holding down the right mouse button and moving the mouse in the scene window.

    Annotation 2020-09-03 205111.png

    Here is the expanded hierarchy for one of those frames:

    upload_2020-9-3_21-11-44.png

    I will look into this more and post an update or another reply.

    Edit - I tried to find out more but kind of stumped, anyone got any ideas where should I look next? Or should I report a bug?
     
    Last edited: Sep 3, 2020
  14. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,460
    What's SceneViewOpenTilePaletteHelper ? Seems to be something that registers to SceneView's update loop and then spending some 7ms on processing stuff.
    Is that Unity's Tile palette system, an Asset store package or something you wrote yourself?
     
    mjc33 and Peter77 like this.
  15. mjc33

    mjc33

    Joined:
    Oct 9, 2019
    Posts:
    26
    It's definitely not anything I wrote myself - I will try doing a grep on my project to find where that's coming from and report back
     
  16. mjc33

    mjc33

    Joined:
    Oct 9, 2019
    Posts:
    26
    I've grepped the whole project for SceneViewOpenTilePaletteHelper and OpenTilePaletteHelper with no matches, so I'm thinking it must be something built into Unity?

    Looking up the docs for tile palette, I'm confused by why this is happening since my project is 100% 3d and I'm not using tile palettes:

    upload_2020-9-4_12-3-27.png

    So I tried removing the '2d tilemap editor' package in package manager and the issue immediately was fixed, back to smooth framerates in scene view!

    Thanks Peter and Martin for your help with this, I'm happy I can get back to work using the new beta :)
     
    MartinTilo, Enzi and Peter77 like this.
  17. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Glad to hear that this solved the issue for you! Still, if you could submit a bug report with a reproducible for this issue, we'd highly appreciate it.
     
    mjc33 likes this.
  18. JohanF_TF

    JohanF_TF

    Joined:
    May 20, 2015
    Posts:
    75
    Stumbled on this thread after we experienced similar issues in 2020.2.0b6. Removing the package helped. Package version was 1.0.0

    Looking in the profiling trace, it seems there are editor windows in that package calling EditorWindow.HasOpenInstances every frame (but you probbly knew that, looking at the profiling trace posted above). I wasn't able to dig deeper than that, and unfortunately don't have a good, small repro case for this. Just wanted to let you know the issue still exists.
     
  19. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Looks like we have a fix for this that recently landed in the main development branch. It will get backported to 2020.2 but I can't give you an ETA at the moment.
     
    mjc33 likes this.