Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Unity Editor UI keeps reloading something after each click

Discussion in '2021.1 Beta' started by newguy123, Jan 31, 2021.

  1. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    611
    Hi Guys

    I very regularly get this, just from clicking in project settings, without changing any settings.
    upload_2021-1-31_14-15-19.png

    What is this and why am I getting it? Hard to be productive when this pops up every few clicks
     
  2. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    611
    For example I highlighted a HDRP Quality asset in Assets > Settings, hit CTRL+D to duplicate it. That should be instant, but this came up and was sitting there for about 30 seconds:

    upload_2021-1-31_14-18-33.png
     
  3. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    611
    64GB Ram
    12 core i7
    RTX 2070 Super
    Windows 10 Pro 20H2
    NVidia Studio driver 461.40
    SSD drive for OS and this project
     
  4. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    611
    Simply selecting the Main Camera in the HDRP Template scene:

    upload_2021-1-31_14-28-2.png
     
  5. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    611
    Anybody?
     
  6. Bosozuki

    Bosozuki

    Joined:
    Dec 19, 2013
    Posts:
    51
    I have been getting the same. I am using 2020.2 though.There was a change in how Unity does messages to let you know what it is doing other than just saying hold on, my guess is that it is related to that change.

    This causes some problems that I have run into to. If I am writing software in visual studio 2019, save and then switch back to unity. Sometimes the unity editor will compile the code other times I will have to minimize/ maximize unity to get the unity editor to recognize code changes have taken place. (I have set the correct setting in visual studio and unity for auto refresh but does not seem to change anything)

    I mention this because they may be related. Its as if the unity editor is going into some sort of aggressive sleep mode, which could explain the repaint message you are getting.

    I have not submitted a bug report yet since I am not sure if I am missing some setting in Unity or the OS
     
  7. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,422
    You should try to turn on the profiler in editor mode, so you get some clue about what's causing the slowdown. It's probably a Unity bug, but unless it's happening with everyone, a bug saying "sometimes something is causing a slowdown" isn't very easy to investigate.
     
  8. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    368
    When you shutdown the editor and you look at the Editor.log you should see many [Performance] ... entries. Please share those log entries. It can maybe show what is stalling that much and how much time each performance tracker took.

    Here's an example of those performance trackers that gets logged when you shutdown the editor:

    Code (CSharp):
    1.  
    2. [Performance] GameView.MouseLeaveWindow : 2 samples, Peak.   115 us (1.2x), Avg.  97.7 us, Total. 195.4 us (0.0%)
    3. [Performance] TooltipView.Paint         : 2 samples, Peak.  51.0 ms (2.0x), Avg.  25.7 ms, Total. 51.38 ms (0.0%)
    4. [Performance] TooltipView.Repaint       : 2 samples, Peak.  49.6 ms (2.0x), Avg.  24.9 ms, Total. 49.85 ms (0.0%)
    5. [Performance] SceneView.OnGUI.mouseDrag : 1 samples, Peak.  1.40 ms (1.0x), Avg.  1.40 ms, Total. 1.404 ms (0.0%)
    6. [Performance] SceneView.MouseUp         : 1 samples, Peak.  1.20 ms (1.0x), Avg.  1.20 ms, Total. 1.197 ms (0.0%)
    7. [Performance] SceneView.OnGUI.mouseUp   : 1 samples, Peak.   647 us (1.0x), Avg.   647 us, Total. 646.7 us (0.0%)
    8.  
     
    Thygrrr likes this.
  9. Bosozuki

    Bosozuki

    Joined:
    Dec 19, 2013
    Posts:
    51
    Sorry for the late reply took me a min to find that file

    Code (CSharp):
    1. [Performance] GameView.Paint                                                             :   130716 samples, Peak.   125 ms (45.7x), Avg.  2.73 ms, Total. 356.8 s (2.8%)
    2. [Performance] GameView.Repaint                                                           :   130716 samples, Peak.   125 ms (46.0x), Avg.  2.71 ms, Total. 354.0 s (2.8%)
    3. [Performance] GameView.OnGUI.Layout                                                      :   130726 samples, Peak.  28.0 ms (113.4x), Avg.   247 us, Total. 32.27 s (0.3%)
    4. [Performance] GameView.OnGUI.repaint                                                     :   130716 samples, Peak.   103 ms (52.5x), Avg.  1.96 ms, Total. 255.7 s (2.0%)
    5. [Performance] SceneView.Paint                                                            :   119698 samples, Peak.  2.44 s (611.4x), Avg.  3.99 ms, Total. 477.1 s (3.8%)
    6. [Performance] SceneView.Repaint                                                          :   119698 samples, Peak.  2.44 s (650.6x), Avg.  3.75 ms, Total. 448.3 s (3.6%)
    7. [Performance] SceneView.OnGUI.Layout                                                     :   119776 samples, Peak.   102 ms (268.2x), Avg.   379 us, Total. 45.36 s (0.4%)
    8. [Performance] SceneView.OnGUI.repaint                                                    :   119697 samples, Peak.   129 ms (45.7x), Avg.  2.82 ms, Total. 338.1 s (2.7%)
    9. [Performance] GizmoManager.DrawGizmos                                                    :   239394 samples, Peak.  4.83 ms (93.2x), Avg.  51.8 us, Total. 12.40 s (0.1%)
    Code (CSharp):
    1. Performance] GizmoManager.RecalculateGizmos                                             :      219 samples, Peak.   343 us (7.9x), Avg.  43.6 us, Total. 9.559 ms (0.0%)
    2. [Performance] Toolbar.Paint                                                              :     1175 samples, Peak.  32.9 ms (14.4x), Avg.  2.29 ms, Total. 2.688 s (0.0%)
    3. [Performance] Toolbar.Repaint                                                            :     1175 samples, Peak.  32.9 ms (17.6x), Avg.  1.87 ms, Total. 2.192 s (0.0%)
    4. [Performance] ProjectBrowser.Paint                                                       :     1434 samples, Peak.  1.04 s (104.3x), Avg.  9.94 ms, Total. 14.26 s (0.1%)
    5. [Performance] ProjectBrowser.Repaint                                                     :     1434 samples, Peak.  1.04 s (108.0x), Avg.  9.61 ms, Total. 13.78 s (0.1%)
    6. [Performance] ProjectBrowser.OnGUI.Layout                                                :     1837 samples, Peak.   153 ms (56.1x), Avg.  2.73 ms, Total. 5.014 s (0.0%)
    7. [Performance] ProjectBrowser.OnGUI.repaint                                               :     1432 samples, Peak.  28.5 ms (6.3x), Avg.  4.54 ms, Total. 6.506 s (0.1%)
    8. [Performance] SceneHierarchyWindow.Paint                                                 :     2714 samples, Peak.  3.41 s (493.0x), Avg.  6.93 ms, Total. 18.80 s (0.1%)
    9. [Performance] SceneHierarchyWindow.Repaint                                               :     2714 samples, Peak.  3.41 s (502.9x), Avg.  6.79 ms, Total. 18.43 s (0.1%)
    Code (CSharp):
    1. [Performance] ConsoleWindow.OnGUI.repaint                                                :      425 samples, Peak.  3.04 ms (3.7x), Avg.   811 us, Total. 344.7 ms (0.0%)
    2. [Performance] InspectorWindow.Paint                                                      :     3023 samples, Peak.  1.16 s (90.3x), Avg.  12.9 ms, Total. 38.89 s (0.3%)
    3. [Performance] InspectorWindow.Repaint                                                    :     3023 samples, Peak.  1.16 s (91.6x), Avg.  12.7 ms, Total. 38.34 s (0.3%)
    4. [Performance] InspectorWindow.OnGUI.Layout                                               :     3120 samples, Peak.  22.0 ms (264.7x), Avg.  83.1 us, Total. 259.4 ms (0.0%)
    5. [Performance] InspectorWindow.OnGUI.repaint                                              :     3020 samples, Peak.  9.30 us (11.5x), Avg.   812 ns, Total. 2.452 ms (0.0%)
    6. [Performance] Application.InvokeFinishedLoadingProject                                   :        1 samples, Peak.  46.5 ms (1.0x), Avg.  46.5 ms, Total. 46.53 ms (0.0%)
    7. [Performance] ProcessService.OnProjectLoaded                                             :        1 samples, Peak.  40.9 ms (1.0x), Avg.  40.9 ms, Total. 40.86 ms (0.0%)
    8. [Performance] Application.InvokeProjectWasLoaded                                         :        1 samples, Peak.  1.00 ms (1.0x), Avg.  1.00 ms, Total. 1.002 ms (0.0%)
    9. [Performance] Application.Message                                                        :  3252164 samples, Peak.  8.31 s (176190.0x), Avg.  47.1 us, Total. 153.3 s (1.2%)
    10. [Performance] Application.Message.WM_00060                                               :      930 samples, Peak.   570 us (9.9x), Avg.  57.8 us, Total. 53.78 ms (0.0%)
    11. [Performance] Application.Message.MouseMove                                              :    47659 samples, Peak.  1.53 s (2088.1x), Avg.   733 us, Total. 34.92 s (0.3%)
    12. [Performance] ProjectBrowser.Ignore                                                      :     1284 samples, Peak.  1.70 us (2.0x), Avg.   859 ns, Total. 1.104 ms (0.0%)
    13. [Performance] Application.Tick                                                           :  3253495 samples, Peak.  4.86 s (7679.3x), Avg.   633 us, Total. 2.059 ks (16.4%)
    Code (CSharp):
    1. [Performance] Application.TickSceneTracker                                               :  3253495 samples, Peak.   728 ms (5246.2x), Avg.   139 us, Total. 451.4 s (3.6%)
    2. [Performance] EditorApplication.update                                                   :  3253495 samples, Peak.   724 ms (5899.1x), Avg.   123 us, Total. 399.4 s (3.2%)
    3. [Performance] ConsoleLog.Tick                                                            :    61409 samples, Peak.   404 us (126.8x), Avg.  3.19 us, Total. 195.7 ms (0.0%)
    4. [Performance] HierarchyWindow.Tick                                                       :    17222 samples, Peak.  10.7 ms (2868.4x), Avg.  3.72 us, Total. 64.10 ms (0.0%)
    5. [Performance] Inspector.Tick                                                             :    17222 samples, Peak.  34.8 ms (246.1x), Avg.   141 us, Total. 2.436 s (0.0%)
    6. [Performance] Tooltip.Tick                                                               :   238147 samples, Peak.  37.2 ms (1027.4x), Avg.  36.2 us, Total. 8.624 s (0.1%)
    7. [Performance] Application.RequestRepaintForPanels                                        :   589194 samples, Peak.   742 us (132.0x), Avg.  5.62 us, Total. 3.312 s (0.0%)
    8. [Performance] Application.UpdateScene                                                    :   589194 samples, Peak.   608 ms (385.2x), Avg.  1.58 ms, Total. 929.7 s (7.4%)
    9. [Performance] GUIView.RepaintAll.PlayerLoopController                                    :   130609 samples, Peak.   607 ms (93.7x), Avg.  6.48 ms, Total. 846.3 s (6.7%)
    Code (CSharp):
    1. [Performance] Application.UpdateTextureStreaming                                         :   324513 samples, Peak.  16.1 us (42.7x), Avg.   377 ns, Total. 122.5 ms (0.0%)
    2. [Performance] Application.UpdateVideoTextures                                            :   324513 samples, Peak.  85.8 us (330.2x), Avg.   260 ns, Total. 84.33 ms (0.0%)
    3. [Performance] PackageImporter.Tick                                                       :    61393 samples, Peak.   125 us (177.3x), Avg.   703 ns, Total. 43.14 ms (0.0%)
    4. [Performance] InspectorBackground.Tick                                                   :    81591 samples, Peak.  15.3 us (17.7x), Avg.   866 ns, Total. 70.62 ms (0.0%)
    5. [Performance] Application.ChangeLayoutIfNeeded                                           :  3253495 samples, Peak.  3.28 ms (13362.1x), Avg.   246 ns, Total. 799.2 ms (0.0%)
    6. [Performance] AsyncReadManager.ForceCloseFiles                                           :    12413 samples, Peak.   278 us (103.1x), Avg.  2.70 us, Total. 33.47 ms (0.0%)
    7. [Performance] GUIView.RepaintAll.RepaintScene                                            :   458605 samples, Peak.  4.86 s (7543.2x), Avg.   644 us, Total. 295.3 s (2.3%)
    8. [Performance] Application.Message.Timer                                                  :      891 samples, Peak.  93.9 us (7.6x), Avg.  12.4 us, Total. 11.06 ms (0.0%)
    9. [Performance] Application.Idle                                                           :  2943915 samples, Peak.  34.8 ms (10.0x), Avg.  3.47 ms, Total. 10.20 ks (81.1%)
    Code (CSharp):
    1. [Performance] Application.Message.WM_00203                                               :       22 samples, Peak.  8.31 s (15.1x), Avg.   550 ms, Total. 12.10 s (0.1%)
    2. [Performance] InactiveGI.Tick                                                            :    38851 samples, Peak.  1.12 ms (20.9x), Avg.  53.6 us, Total. 2.082 s (0.0%)
    3. [Performance] RequestRepaintForPanels                                                    :  2664301 samples, Peak.  1.07 ms (257.2x), Avg.  4.16 us, Total. 11.10 s (0.1%)
    4. [Performance] GUIView.RepaintAll.RequestRepaint                                          :  2664301 samples, Peak.   551 ms (14335.4x), Avg.  38.5 us, Total. 102.5 s (0.8%)
     
    Last edited: Feb 3, 2021
  10. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,497
    Thanks @Bosozuki, unfortunately it's not clear from the shared parts what is going on. Could you please submit a bug report for this issue and reference the issue ID in this thread? The bug reporter automatically attaches the log file and other relevant data that can help us identify the issue.
     
  11. Bosozuki

    Bosozuki

    Joined:
    Dec 19, 2013
    Posts:
    51
    Thanks I submitted the bug report, just waiting on the issue ID now.

    Its a quirky issue more of an annoyance than anything. My guess is that I am floating around some edge case from using four monitors, I have four monitor layout setup for Unity and I switch between Visual studio 2019 and unity through the task bar. I put all of that info in the bug report along with a screenshot.
     
    Jmeij, jonathans42 and LeonhardP like this.
  12. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    368
    This has been quite frustrating for me too, it really slows down the iteration speed and makes the overall UX frustrating
    After every single time I open Unity it takes 5-7 mins just to open and to import something during that although nothing's changed, it even has to do script compilation at each startup for some reason o_O
    Also when clicking anything in the hierarchy it takes quite a long time to respond

    I had been wondering if my system had slowed down but then I checked it with older versions of unity and it was fine
     
    Ruslank100 and newguy123 like this.
  13. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    368
    Yeah there is absolutely something to investigate. What would help the most is if you can submit a bug report and share your project that repro these slow down issues or if you can pinpoint where the slow downs are using the Profiler and saving the traces (.profile files).
     
  14. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    368
    Can you tell me how I can share this, I have no idea where the log files are either
    Also, I don't think I can submit a particular project because it is tied to unity versions and not the project itself
     
  15. Bosozuki

    Bosozuki

    Joined:
    Dec 19, 2013
    Posts:
    51
    Case ID 1313824

    issue tracker webpage

    I will create a better project if I am able to better reproduce the issue. Its almost as if the Unity editor when losses focus (click on another application or minimize) and I try to click back onto Unity it does not want to refocus or does focus but into to some weird state, hence the unity editor does not see the script code changes or when you click on the assets in the hierarchy the gui.repaint message appears.

    I feel like I am not being very helpful here... but I will try a few more experiments to see if I can more reliably reproduce the issue with steps
     
    Last edited by a moderator: Feb 16, 2021
    LeonhardP likes this.
  16. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    150
    I had a similar issue in our project that I couldn't reproduce in a separate clean project. The Unity would start showing a busy message if I open a popup list in animation panel or context menu in Project window.
     
  17. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    48
    Are any of u using HDRP with Vulkan api? This combination causes similar symptoms to what u describe (with the exception that 90% of the time the editor never unlocks again I have to manually kill it).
    It's probably unrelated but just in case.
     
  18. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    377
    Does anyone actually use 2020.x ? "Hold on busy (for ...s)" seems to be a non-stop occurrence. I've actually got work to do. Sticking to LTS.
     
    PutridEx and Ruchir like this.
  19. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    123
    This is really frustrating. Can we please have any update on this?
     
    Ruchir likes this.
  20. Crayz

    Crayz

    Joined:
    Mar 17, 2014
    Posts:
    186
    Getting this also. Often waiting on a progress bar after clicking an inspector or moving a prefab/gameobject
     
    Ruchir likes this.
  21. blu3drag0n

    blu3drag0n

    Joined:
    Nov 9, 2018
    Posts:
    73
    Any Update to this ?
    I'm having this the last several versions after the 2019 LTS one.
    Now I am trying 2021.x.

    I created a new project yesterday and added one simple script with 10 lines of code and 5 empty gameobjects and a simple Scroll Rect mechnism.
    And while doing so every sinlge change in code or hitting play take 10 seconds for refreshing/compiling.
    I have a high-end rig, so dont tell me about hardware.
    I just upgraded to better hardware in between switch between Unity versions.
    I had no issue with much lower hardware while using 2019 LTS or (some) of the 2020.x versions.

    What is it actually doing there?
    You can say the project is empty, its super annoying and makes me lose interest in using Unity any further like this.
     
    Ruchir likes this.
  22. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,327
    You can find that out by using the Profiler.

    Use the Standalone Profiler, switch the profiler target from Playmode to Editor, turn on Deep Profiling and do the thing that prompts this bar. Stop recording after that and investigate what happened in that spike frame. Such delays can be down to any number of things, including Asset Store Plugins or your own code, (I can practically guarantee you that you are all having different root issues so just lumping all of these together here without any details won't get us anywhere useful).

    If your investigation of the profiler shows that it is down to something weird on the Unite Editor or Engine side (i.e. not Asset Store or your own code), save the profiler capture to a .data file (the option for that is in the Profiler Window's toolbar, in the top right hand corner) and consider filing a bug report with that.
     
    jonathans42 and LeonhardP like this.
  23. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    79
    Yup. Also happens whenever I change my code and save using Visual Code. I also need to bring up the unity tab for it to recognize the code changes and start doing the reload.
     
  24. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    377
    @MartinTilo Trying not to be rude here (truly) but I think you're missing the point. Having to profile my app makes sense and is part of using any engine, but having to profile the editor is not something I would expect in a major release. Something fairly big changed after 2019LTS which has made the Editor nigh on unusable. I'm using the same assets and codebase as I am in 2019LTS but in 2020.x everything just causes this 'busy' message. We use Unity as a tool and shouldn't be expected to have to put up with an issue that's so obviously counterproductive to an efficient workflow. Makes me really worried for the future of the engine.
     
    hg001, syscrusher and SanchoP like this.
  25. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    611
    Like I mentioned, I'm not even getting to the part of MY app yet. Simply opening the HDRP template and clicking on things...
     
  26. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    16
    I have the same issue. Running 2020.2.1
    It was after setting up the microsplat asset. Because before it was running with no major problem.
     
  27. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,327
    No, I get the point and I hope you won't take my approach to this the wrong way either. Keep in mind that I'm working on the profiling tools so my goal is to make your live and that of our internal developers and QA easier in finding performance issues and that I'm therefore not usually in the business of actually making any performance improvements happen directly, unless they are to do with the Profiling tooling themselves. I know that having to do this isn't great but my philosophy is that I'd rather know what is actually going on and give specific complaints than broad statements, because I believe the former is way more likely to actually change my own situation. So I'm biased that way.
    The editor is not just running code shipped by Unity or operating on data supplied by Unity, nor can we ensure against any possible hard and software combination that makes up the desktop machines our users are running on. We CAN do better and ARE continuously adding more performance tests measuring editor performance and iteration times, all the while continuing to expand the tool set and infrastructure to be able to make these measurements, and we ARE doubling down on this (also as a result of threads like this one, so it's not like these broad complaints have no effect, they are just not quite as effective as narrower bug reports). This is all a longer process and will eventually avoid such regressions reaching you (if they did indeed originate in stuff shipped by us). For the ones that you are already affected by, this testing is not going to help much, except where it is used to narrow down where the regression happened, which is not usually something these tests can find out for past versions on which the tests didn't exist yet. There, only the existing tooling like the Profiler and Profile Analyzer or platform specific profilers can help narrow things down, so that we can then fix them, and adding new performance tests around that area to avoid it regressing again. Now, to find all of these, we need to know about them. For some of the ones you are experiencing, we probably DO know about them and ARE working on fixing them, but given the amount of hard and software combinations, there is a chance that we don't yet know about some variations on this. Additionally, there is always the possibility that some thing specific to your project, some editor scripts of yours or a plugin or Asset Store package is the root cause for some issue you are experiencing. It might not sound likely that this would regress from one Unity version to the next then, but I also wouldn't be surprised if it does. Maybe it's just something using outdated approaches or APIs or a niche API that weren't covered in our tests?
    My point is not to do blame shifting and therefore force you to profile the editor to proof it's on us. The point is only to point out for those of you willing to dig a bit further than observing surface level issues, to find out more specifically what might be causing this, because once you have that info, you can:
    • See if there already is a bug report on issues in that area, and if so, track that issue's bug ticket to know when to update to get it fixed.
    • If it isn't known yet, Inform us with a bug report that is actionable and will therefore be seeing action and improvements faster and checked against the scenario you discovered
    • Find ways to mitigate it on your side, which can give you a faster short term productivity gain.
    • Maybe learn something or make some other interesting observations about performance in the process? I'm a curious individual so this kind of added bonus is often a factor for me.
    • Should it indeed be an Asset Store or one of your own scripts, you can then figure out what to do about those too.
    Without profiling it, all you can do is post into threads like this one and hope for change. I know that every one has their own deadlines, priorities and biases so which approach to take on this is your individual choice and I'm not criticizing either. The only reason for me to enter this thread was to answer the questions posed about how to actually find out what is going on, because that was asked by some. As stated, my priorities also don't lie on finding and fixing these myself, but on making them easier to find, so it'd be entirely wrong for me to judge you that way ;).

    Lastly:
    That is only something to complain about, if the operations this appears for are actually taking longer now and isn't just psychological because it is now way more in your face about it. I'm assuming that is the case for you, in which case complaining about the message is also not making too much sense and it'd be more precise to complain about the actual operation taking so long.

    We've taken note of the feedback that the message could be more explicit and are pondering solutions for that. If you only care about not wanting to see the message that often, you can adjust the settings under Preferences/General/Busy Progress Delay to a higher value.
     
  28. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,327
    From the name of it, I'm assuming this is an Asset Store package? Have you tried contacting the developer of that package yet?
     
  29. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    377
    Thanks @MartinTilo Very much appreciate the thorough and thoughtful response, and for you taking the time to join in the discussions on this thread. :)
     
  30. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    16
    Well I just deleted the project and got the git backup
     
  31. valarus

    valarus

    Joined:
    Apr 7, 2019
    Posts:
    258
    For scene view and GUI takes the longes. Using HDRP 11 package only.
    Code (CSharp):
    1. [Performance] Application.UpdateScene: 82123 samples, Peak.  3.66 s (633.3x), Avg.  5.77 ms, Total. 474.0 s (65.8%)
    2. [Performance] GUIView.RepaintAll.PlayerLoopController: 53613 samples, Peak.  3.63 s (431.5x), Avg.  8.42 ms, Total. 451.3 s (62.6%)
    3. [Performance] SceneView.Paint:  50325 samples, Peak.  3.63 s (476.3x), Avg.  7.62 ms, Total. 383.4 s (53.2%)
    4. [Performance] SceneView.Repaint:  50325 samples, Peak.  3.63 s (478.8x), Avg.  7.58 ms, Total. 381.4 s (52.9%)
    5. [Performance] SceneView.OnGUI.Layout:50608 samples, Peak.  43.6 ms (70.5x), Avg.   619 us, Total. 31.31 s (4.3%)
    6. [Performance] SceneView.OnGUI.repaint: 50312 samples, Peak.  1.15 s (194.3x), Avg.  5.93 ms, Total. 298.5 s (41.4%)
    7. [Performance] Application.Tick:  82123 samples, Peak.  8.09 s (1298.5x), Avg.  6.23 ms, Total. 511.7 s (71.0%)
    Compiling scripts is taking longer and longer.
     
    Last edited: Feb 28, 2021
  32. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,327
    Re specifically the .profile files, or rather .profile.data files... Those get generated by the Performance Tracker Package if you record some Performance Trackers.

    That package could also be an interesting and lighter weight way for you to track editor performance.
     
    jonathans42 and Ruchir like this.
  33. fgardler

    fgardler

    Joined:
    Jun 11, 2016
    Posts:
    58
    I know you are trying to do your job and I know us users are awful and ungrateful (I am not being sarcastic, I genuinely know the pain of working in your kind of role and I am genuinely sympathizing). That said...

    The fact that Unity Employees working on profiling tooling are unaware of one of the most popular terrain/shader optimization tools on the Asset Store. A tool published by an accomplished AAA developer. A tool published by someone who has a reputation for working with Unity to help them engage better with assert publishers is, frankly, the problem.

    I respectfully suggest that your manager ensures all their team have time to go and build spike projects using the most popular assets on the store. There aren't many of them, cover the top 10 and you will cover 90% of the pain us users are experiencing. Do it before you slap LTS on a release and we won't have to spend an age submitting bug reports.

    Oh, and by the way, I am pretty certain the problems in this thread have NOTHING to do with third party assets.

    Even as tiny Indie with no license fee for Unity I spend thousands in your store every year. I expect a LTS to save me time not cost it.
     
    SanchoP, knxrb, DEEnvironment and 2 others like this.
  34. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,327
    I think you are misunderstanding my role in this a little bit and shooting the messenger due to justified general frustrations. I work on the tooling to discover performance problems, not on actually ensuring performance of the editor or the Unity runtime (beyond the impact this tooling has on these). Sure us profiling engineers need to look at projects to to work out if the tooling helps and works to expose issues and guides towards optimization. Yes we need to have an understanding of performance optimizations techniques being deployed and how to track how they are doing in the tooling. And yes, having some hackweeks with projects were we use the tooling can help but I'm not sure if those lead to what you think they should with regards to my work specifically.

    Looking at how our tooling does on different customer projects, big and small, is imo were I'm taking most of the pointers from. A) there's way more of them to look at than what I can build on my own, B) they tend to tap into traps I'd likely have avoided to begin with and find entirely new ones I wasn't even aware of C) they are more diverse and bigger than anything I or our team could build in a hackweek. Besides that we also have internal productions to facilitate closer feedback loops on all of this and also bring such pains to the relevant team.

    I don't think the profiling tools are causing these pains for you, though they might not be fully adequate to help you and us internally to narrow these down quicker and fix or avoid them or improve upon the situation? I'm lingering in the forums and such threads to point towards them and their usage to help you and us get actionable insights out of a generic "it's slow!" and try to find inspiration for how to improve them to make this step superfluous and generally help with understanding these.

    I can accept that there is the possibility that all the posts about performance issues in this thread are down to Unity and not something else. Given other threads and issues I've seen and the vagueness of some of the issue descriptions I wouldn't venture as far as to say I'm certain about anything regarding these though, not whether they are caused by Unity or a third party asset. I think the only thing I am certain about is that they all need more detailed investigations (using our profiler tooling or external tools) to find a resolution to them, one way or another.

    I was also not trying to slight the MicroSplat asset or imply it is all on other tools. The post I was referring to was just way to vague to even be sure if the same project with the same asset in it runs fine on older unity versions and slow on newer ones, or if just setting it up and using it that is causing some slow downs. The former case would indicate something in the Editor or Engine changed to cause issues when using this asset. The other case could mean a whole host of other things, which don't seem valuable to lump into a thread that is just sharing general slowness reports of varying detail instead of somewhere more concrete.

    It could still totally boil down to an issue with the Editor or Engine, and yes, if I used this specific asset in a project and hit the same issue and decide to look at it with the Profiler, finding out it was on us, then I'd likely see that the right team knows about the issue and can address it. Right now I'm more focused on making memory profiler tooling more helpful and the output more actionable to help more people understand their project's memory usage better. While doing that I'll make sure it works with entirely different project setups, doesn't die when profiling big projects, etc.. That at least feels like the better use of my time right now.

    But I've taken your suggestion into consideration. Maybe next Hackweek I'll use this and similar asset store assets. :)
     
    stuksgens, Lurking-Ninja and Ruchir like this.
  35. stuksgens

    stuksgens

    Joined:
    Feb 21, 2017
    Posts:
    136
    Our team has projects in 2019 LTS and projects in 2020.2 (And this week or next, our team will migrate some to 2020LTS)

    but one thing I noticed is that in 2019.x and earlier, there were no interruption warnings on the screen ... from 2020 this started to happen. And I believe that it is precisely about this warning that people are commenting... in a way in 2019, the editor did the same things, but it was disguised, and the editor was not paralyzed. But in 2020, these warnings occur all the time, and freeze the editor.

    In my case, the most time consuming is the load of the unity layout (If I'm not mistaken, the rebuild.UI or layout.Rebuild or something like that) This element is extremely time consuming to load. In terms of scripting, this also occurs, but it was already expected... still, it takes time.

    In general, the iteration time is now shorter ... it would be nice if some of these jobs were done in the background, so as not to interrupt our workflow.
     
    MartinTilo, Ruchir and PutridEx like this.
  36. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,710
    You can control the time it takes for the progress bar to show in the editor preferences ("progress dialog delay").
     
    stuksgens and MartinTilo like this.
  37. stuksgens

    stuksgens

    Joined:
    Feb 21, 2017
    Posts:
    136
    Thanks... :D
    I just changed this setting to 0.1 and I already felt the difference. it's better this way.

    upload_2021-3-23_13-26-11.png

    But why is this setting set to 3 by default? :eek:

    This value is too big to be standard, as I said, the editor interrupts for almost anything. Waiting 3 seconds "for everything" is not a good thing.

    I also realized that this setting is not in the documentation yet. it would be good to include it


    Thanks again, this will really speed things up here;)
     
  38. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    79
    some people complained that it pops up too often. And that sometimes it pops for a second then goes away. That's why. This really tells you there's no right solution, what some people like, others dislike.
     
    stuksgens likes this.
  39. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    48
    I think what that config does is to delay the popping up of the dialog until a process blocks the UI for at least the configured time.
     
  40. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    150
    Yes, so setting it to smaller values should actually make the dialog pop up more often. 3 seconds seems like a sensible value.
     
    stuksgens likes this.
  41. stuksgens

    stuksgens

    Joined:
    Feb 21, 2017
    Posts:
    136
    I understand from the description of this button that apparently it will wait so many seconds after the editor returns from a defrost:rolleyes:... That's why now these warnings just flash on my screen eventually.:p

    But for me, it seemed that the warning ends faster, the lower this value, I realized this in 2020.3.0f ... this is strange.o_O
     
  42. DrShadow97

    DrShadow97

    Joined:
    Jul 1, 2020
    Posts:
    2
  43. fgardler

    fgardler

    Joined:
    Jun 11, 2016
    Posts:
    58
    This thread is particularly tone deaf. The problem is NOT that a window pops up to say "Busy" it's that the editor is unreasonably busy.

    I recently took the time to reimplement my problematic project in 2019 - it was just a spike project to see if I wanted to update our main project to 2020 LTS yet. That spike is now MORE complex (as in more code and more imported assets) than the 2020 version and I do NOT have the unreasonable wait times I experience in the 2020 version.

    Changing the time a dialog is displayed does not change the editor performance. Sure we can help profile problems with edge case bugs. But judging by the number of people hitting performance problems in 2020 I'd say this is not an edge case.

    Pointing at asset devs, which is frankly common behaviour for Unity, is disrespectful. While I can accept there will be problematic assets out there (my own editor tools have been known to cause problems, for sure) it actually starts with Unity. If Unity wants to leverage the strength of the Asset Store then Unity MUST support those devs, not blame them for regressions.
     
    Last edited: Mar 28, 2021
  44. fgardler

    fgardler

    Joined:
    Jun 11, 2016
    Posts:
    58
    I just got this error in the Unity console:

    Code (CSharp):
    1. An infinite import loop has been detected. The following Assets were imported multiple times, but no changes to them have been detected. Please check if any custom code is trying to import them:
    2. Assets/Video Recordings/Grand Theft Amphibian/2021-03-27 21-40-07.mp4
    3. Assets/Video Recordings/Grand Theft Amphibian/2021-03-27 11-01-08.mp4
    4. Assets/Video Recordings/Grand Theft Amphibian/2021-03-27 11-01-17.mp4
    5. Assets/Video Recordings/Grand Theft Amphibian/2021-03-27 02-21-47.mp4
    6.  
    It's nice that Unity detected an infinite loop. That could, of course be catastrophic. However, how many times did that loop happen before deciding it was infinite? Could that possibly be a source of these horrible slow downs in Unity?
     
  45. fgardler

    fgardler

    Joined:
    Jun 11, 2016
    Posts:
    58
    Or maybe this... with NO third party assets and 8 of my own scripts. This now happens *every* time I save an edit to a script.

    upload_2021-3-29_0-5-43.png
     
    Ruchir likes this.
  46. Crow_AL

    Crow_AL

    Joined:
    Jan 25, 2016
    Posts:
    411
    @Aras -- Just a suggestion. Maybe the team leads of 2020 \ 2021 should talk to the team lead of 2019 and find out what they did to keep a smooth, without "hold-on" , performance? :oops:

     
    jeromeWork likes this.
  47. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,710
    People looking after 2020/2021 and 2019 are the same people.

    At this point we don't know what causes 2020+ to be slower at some operations for some users. That's why we want bug reports, or any info you can get really (and no one anywhere blamed asset store packages -- it could be that some of Unity's own package is the culprit! But we don't know which one)

    Things that have been suggested & found so far:

    - Clicking Material shader dropdown results in a very long "wait..." dialog. This was a bug in shader compilation related code that was forever increasing Library/ShaderCache.db file size on every build or platform switch. The bug started happening in some 2020.1 version IIRC, and should be fixed by now. Workaround is deleting Library/ShaderCache.db file.

    - Some users have said that Collaborate package, when installed/enabled, causes some operations in the editor to be much slower in 2020 and later versions. No conclusive data on this, since for many other users that does not happen. If that happens to you, we'd love a bug report.

    - so far no other conclusive data has been found. If you have anything, please share!
     
    Ruchir likes this.
  48. stuksgens

    stuksgens

    Joined:
    Feb 21, 2017
    Posts:
    136
    Crow_AL likes this.
  49. Crow_AL

    Crow_AL

    Joined:
    Jan 25, 2016
    Posts:
    411
    Hi @Aras
    Thanks for the reply. I wish I could pinpoint what is causing it.

    I opened up Unity and pressed CTRL+O to load a scene .. and Unity had a 1 second "hold on".
    I pressed save in the prefab mode and got a 10 second "hold on" for the mouse interaction. :(
    Editing a script in VS 2017 and going back to Unity has a "hold on " delay etc etc

    I'm not complaining. Just that prior to ver 2020, nothing like this lagged the editor. This is very unusual and all these compounding "hold on" moments are a bit disruptive to workflow.

    I wish I could be more descriptive on the cause, but I have no idea where the origin is since the "hold on" application.tick occurs at almost every interaction with the editor. I don't think uploading my 50GB project would be productive.
     
    stuksgens likes this.
  50. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,710
    50GB project as a repro is not unheard of (alternatively: copy the project, delete everything except Assets+Packages+ProjectSettings folders; maybe even delete all textures inside of it, upload that -- likely will be much smaller).

    A windows ETW profiler trace as a bug report (or to look at it yourself) would be most helpful. Easiest to do that is probably via UIForETW tool https://randomascii.wordpress.com/2015/04/14/uiforetw-windows-performance-made-easier/
     
    Ruchir, stuksgens and Baste like this.
unityunity