Low framerate in scene view with Alpha 21

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.

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.

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.

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?

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.

1 Like

Does this happen if you create a completely new empty project?

[quote]
Does this happen if you create a completely new empty project?
[/quote]
As far as I'm concerned, it does: 8 fps in a completely empty project on Linux.

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://discussions.unity.com/t/794996

If it's caused by Unity code, please submit a bug-report:
https://unity3d.com/unity/qa/bug-reporting

2 Likes


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


What does the Hierarchy profiler view show, when you expand all the expensive nodes?

1 Like

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

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.

2 Likes


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

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.

6273575--692933--Annotation 2020-09-03 205111.jpg

Here is the expanded hierarchy for one of those frames:

6273575--692924--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?

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?

2 Likes

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

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:

6276278--693338--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 :)

3 Likes

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.

1 Like

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.


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.

1 Like