Search Unity

Extremely slow editor in 2019.2.0a7

Discussion in '2019.2 Beta' started by DefiantDev_Chris, Mar 7, 2019.

  1. naderlabbad309

    naderlabbad309

    Joined:
    Feb 11, 2018
    Posts:
    31
    Why is still the same problem semaphore.wait for signal use 70% ?But sometimes they disappear and come back again,
     
  2. Steamc0re

    Steamc0re

    Joined:
    Nov 24, 2014
    Posts:
    140
    Also getting Semaphore.WaitforSignal up near the ~100ms range on Mac, in editor and builds. It is nested under skinnedmeshes.update in my profiler, something I'm not seeing anyone else here report. So not to throw out a red herring, but not necessarily GC related, HDRP related, etc.
     
  3. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,887
    To anyone hitting the Canvas.BuildBatch stall issue - we are working on a fix for it at the moment.
     
  4. Vak_HD

    Vak_HD

    Joined:
    Aug 6, 2016
    Posts:
    14
    I too have been having issues with this.
    When building a test to iPhone 6s and using the profiler I saw that I was getting Semaphore.WaitForSignal under the Canvas.BuildBatch which was taken ~ 85ms.

    canvas.png

    Then I decided to remove Ui completely from the scene then I noticed I was getting the same Semaphore.WaitForSignal But this time it was under MeshSkinning.Update which is also taken around the same ~85 ms.

    Skinnedmeshes.png

    Using Unity 2019.2.9 and running on iPhone 6s as the testing device and the profiles are from the device
    Didn't really know where else to post this issue.
     
  5. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,887
    You’re in the right place and we are working on a fix :)
     
  6. Vak_HD

    Vak_HD

    Joined:
    Aug 6, 2016
    Posts:
    14
    Ok good to know!
     
  7. itsjustmeagain

    itsjustmeagain

    Joined:
    Dec 1, 2016
    Posts:
    9
    still no fix for this issue? The framerate when using Rift S is really painful in 2019.2.1f1
     
  8. Wortex17

    Wortex17

    Joined:
    May 19, 2013
    Posts:
    5
    @richardkettlewell Is there ane issue in the issue tracker on which we can check progress on this? Currently, we are locked out of our milestone because of this. Android builds are absolutely unuseable, our stall is about 300ms on a Nexus 7 :(
     
    Last edited: Oct 29, 2019
  9. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,887
    Sure! We have a couple of bugs that relate to the same problem:
    https://issuetracker.unity3d.com/is...-causes-a-slow-editor-when-entering-play-mode
    https://issuetracker.unity3d.com/is...ouse-from-unity-window-to-any-other-os-window

    However, if you are targeting a 30ms frame and you are seeing frames of 300ms, i doubt this bugfix will entirely solve your problems. This bug causes the main thread to wait for the render thread at a place where it should not wait. (it should carry on with its own work). If you are seeing a 300ms stall on this marker, it implies that your render thread has a lot of work to do.

    As a general update - we are still working on getting a fix out for this. Right now we have something that is getting some testing, before we are confident enough to push it out into patches.
     
  10. Wortex17

    Wortex17

    Joined:
    May 19, 2013
    Posts:
    5
    Thanks for the explanation. So it actually masks an actual stall by the render thread?
     
  11. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    315
    Hi, Richard. It's good to hear there is a fix coming for this. It looks like I'm experiencing the same issue. I recently upgraded to Unity 2019.2.9f1. I've seen some areas of *amazing* speed improvements (mostly related to mesh inflating, setting meshes to convex). But I noticed last night that I'm having a huge performance drop when my Cube UI is rendered.


    Here's 2019.2.9f1 rendering the cube with profiling turned on. (77.8 fps is poor performance)

    upload_2019-10-30_10-25-54.png

    Here's 2019.2.9f1 rendering the cube with profiling turned off: 84.7 is better, but still not great.
    upload_2019-10-30_10-29-8.png


    Here's the profiler for 2019.2.9f1 showing that Semaphore.WaitForSignal is taking 8.25ms

    upload_2019-10-30_10-30-22.png



    Here's the same project running in 2018 2.8f1 with the profiler on. So at 98.5 fps, it's running 20 fps faster that 2019.2.9f1

    upload_2019-10-30_10-37-21.png



    Here's the same project running in 2018 2.8f1 with the profiler off. With 114.2 fps, it's running roughly 30 fps faster than 2019.2.9f1
    upload_2019-10-30_10-39-49.png


    Please keep us posted on when you have a fix available. thanks!
     
    pixelR and tspk91 like this.
  12. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    315
    Any updates on this? Also, above this issue was described as a "stall". I'm not seeing the profiler pegged out on this, but I'm seeing a 5-6ms decrease in performance which is still significant. If it helps, in the cube shown above, the issue seems to happen (to a large extent) due to the 2 columns of rounded brown buttons with white text on the left side of the cube. Each of these has an Image script (which displays the rounded brown button), and then a TextMeshPro for the white text. I'm hoping that whatever bug the QA team was able to reproduce is causing the same issue I'm experiencing.
     
  13. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,023
    Every next Unity Editor becomes more and more slower and frustrating to use... doesn't matter official or beta...
    Two things take 100 ms in editor. No way to work.

    This is 2019.3b10 but i switched to it because stuff like this was happening in 2019.1 and 2 as well !

    One time open the editor or some scene and is somewhat better and the next time is just slow !

    upload_2019-11-15_9-13-34.png
     
  14. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,301
    Do you have packages window pinned in layout?
     
  15. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,023
    Nope !
     
  16. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,088
    sleepyGrin likes this.
  17. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,887
    Your screenshot highlights a different issue to the Canvas.BuildBatch stall issue that I've been trying to solve in this thread. I'd advise reporting that as a separate bug, although I think I've also seen it reported elsewhere on the forums already, or maybe raised internally - I can't recall.

    The fix has started to land in our various releases. It is available in 2020.1.0a13, and will be available in 2019.3.0b12, which isn't available to the public just yet.

    We are also going to backport this important fix to 2018.4, but to minimise the risk I want to wait a few days to have the highest confidence that the fix hasn't caused any new issues in the newer versions, before moving forwards with it in 2018.4. (The same applies to 2019.2)

    It's a little out of date unfortunately, but the status can be found here: https://issuetracker.unity3d.com/is...5.1117961645.1573724018-1241184903.1572617167 Hopefully it will show the latest status in a few hours...
     
  18. pixelR

    pixelR

    Joined:
    Sep 16, 2013
    Posts:
    57
    Thank gods! My Android build is also hit by this stall in Canvas batching and I was spending more than necessary time to try to get around it by myself. :D I keep my fingers crossed for a quick 2019.3.0b12 release.
     
    sgower and richardkettlewell like this.
  19. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,023
    Hi, we are having another "Semaphore" issue with unity 2019.2f10 - doing asset package for the store so we have to use older version ! Is this related to the same problem because we get huge lags and the error as in the image but in prefab mode when selecting object and also when altering settings ?

    upload_2019-11-25_11-15-16.png
     
  20. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,887
    No it's different. The Timeline tab on the profiler may show you more - the main thread is stuck waiting for the Render Thread to finish. Either the render thread has lots of CPU work to do (i.e. submitting draw calls and changing material state) or you are GPU bound (waiting for shaders and primitives to actually be drawn)
     
  21. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,023
    Hi, thanks, i am really confused though ! As i am working every day with the engine and have used may be 90 % of the editor versions i would say this is an issue but i really don't know how to investigate it ! This is the timeline profiling the editor when a child object in prefab mode is selected !

    I also found a bug report since May that is most likely the same just the prefab i am selecting has a LOD with two simple child objects. Is there any chance we get fix for this as well any time soon !?
    https://issuetracker.unity3d.com/is...-inside-prefab-causes-editor-lag-slash-freeze

    upload_2019-11-25_13-39-51.png
     
  22. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,887
    I should have added - please don't derail this thread - start your own if you want to continue discussing your issue.
     
  23. WheresMommy

    WheresMommy

    Joined:
    Oct 4, 2012
    Posts:
    890
    It is now two weeks later, deadlines are coming ;) any news about this or fix we can use on current stable releases?
     
  24. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,887
    The fix has only just gone public in the last few days to 2019.3, so I feel it’s still a bit soon to push it out to 2018.4.

    I’ve also seen a new bug report come in on Friday that may be caused by this bugfix. I will be investigating that next week and figuring out how (and when) to proceed from there.

    Apologies for the time this takes.
     
    VRSPACE-DEV-TEAM likes this.
  25. WheresMommy

    WheresMommy

    Joined:
    Oct 4, 2012
    Posts:
    890
    So i went over to 2019.3 and now I get several new bugs and cloud build is broken too. Would you guys mind bring some clearance in that version mess? Cant build for iOS now at all because 2019.3 got some bug that killed your own plugin
     
  26. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,243
    I saw intermittent Semaphor.WaitForSignal times of 170ms on a barebones project in 2019.3.0f1. The frame time went back to 5ms when I maximized the game view and recompiled scripts, making me think that in my case it was something to do with the Editor UI.

    I'm sure it will happen again and will file a bug report when it does, even though I imagine it will be difficult to reproduce.
     
  27. zelderus

    zelderus

    Joined:
    May 20, 2016
    Posts:
    6
    This issue with 2019.3.0f3 on an android device repeated :(
    In issuetracker says: "Fixed in 2019.3" - In which version?
     
  28. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,887
    One of the betas. Definitely included in f3.

    Your stall must be caused by something else :( (even if it still stalls on that profile marker) because I completely removed the sync point with the dynamic geometry - that was what the previous bug report was stalling on.

    I suggest submitting a new report - sorry for the inconvenience. You can reply here with the case number to help us track it.
     
  29. zelderus

    zelderus

    Joined:
    May 20, 2016
    Posts:
    6
    Maybe I have a different problem.
    But in the Profiler, this Semaphore.WaitForSignal confuses me.
    In the editor, this does not bother me in any way, but on the android device (Huawei P10) it affects performance (from 60 fps to 44 fps).
    debug_iss.png

    In this game not empty scene, but I dont do anything in the scene (dont move the camera, dont move characters, and the code dont generate any objects, no memery leaks and so), but after time (~ 1 minute) FPS drops down. In 60 FPS this Semaphore.WaitForSignal take 6-8 ms (sometimes less than 1ms), and then takes ~14 ms, and never drops.
     
    Alex_qiang and IndexZero like this.
  30. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,618
    That Semaphore is simply waiting for your GPU to finish rendering the screen. So you're being stalled by the rendering.

    If that's happening after 1 minute, and you're not changing the amount of things on the screen, it's a bit of a mystery, but since it's a phone, it might be something like thermal throttling or whatnot.
     
  31. zelderus

    zelderus

    Joined:
    May 20, 2016
    Posts:
    6
    Oops, my apologies.
    For performance issues, I always look for problems in the game. But this time I could not understand. The game was in one state for more than a few minutes (animation and other logic had already gone through cycles many times) and everything worked "perfectly." Which gave me reason to believe that the problem is not in the game. However, I was wrong.

    I apologize for disturbing and thank you very much for sending where to look.

    PS. In my case, there was a problem with the (water) shader. I did not remove water objects from the scene, but simply removed the logic in the shader code in "Lighting" and in the "surf" - and performance gaps disappeared on the device (at least 10 minutes were not detected).
     
    Last edited: Dec 12, 2019
    richardkettlewell and Baste like this.
  32. SebMarello

    SebMarello

    Joined:
    Aug 23, 2018
    Posts:
    1
    And so, the problem has long been noticed. Today I also ran into her.
    Has anyone found a solution to the problem?
    Faced a problem on a Redmi Note 7 device, Redmi 7A

    I am using: 2019.2.15.f1
     
  33. PhilipKeenanPhilips

    PhilipKeenanPhilips

    Joined:
    Jul 13, 2017
    Posts:
    2
    I'm still having this issue when trying to develop for Lumin using the XR Plugin Mananger for Magic Leap. Shows up in both builds and editor.
     
  34. APELSIN4STUDIO

    APELSIN4STUDIO

    Joined:
    Dec 14, 2018
    Posts:
    1
    I am also experiencing this problem, tried installing different versions of unity 2019.3. 0f3, 2020.1.0a16. The problem does not disappear, how can it be solved? Profiler with Android
     

    Attached Files:

  35. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,887
    Last edited: Dec 18, 2019
  36. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    My project worked fine in 2018.3 and is about half fps in 2019.2, i checked profile, saw the Semaphore.WaitForSignal, looked in the internet and found this thread
     
  37. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    I am getting 70fps with an empty scene using 2019.2 and i have a good modern computer

    upload_2019-12-19_18-47-52.png
     
  38. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
  39. Sibivarman

    Sibivarman

    Joined:
    Aug 8, 2018
    Posts:
    1
    Is this issue fixed?
     
  40. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,168
    Still happening in 2019.3.0f3, completely unplayable ~1fps.

    Edit: I reported a new one for 2019.3.0f3, I could successfully isolate this issue and created a repro. The case number is 1208003.
     
    Last edited: Dec 28, 2019
    Shadowing and richardkettlewell like this.
  41. Lyrcaxis

    Lyrcaxis

    Joined:
    Dec 8, 2017
    Posts:
    6
    Semaphore.WaitforSignal


    The issue on build has to do with normal maps getting what I'm assuming is called prebaked or whatever, when their renderers are getting on the screen for the first time.

    Or atleast such is the case for URP (note: not really sure about the prebaking part).
     
    Last edited: Jan 21, 2020
  42. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,887
    To everyone who still has problems with Semaphore.WaitforSignal, this is just a generic "Unity is waiting for something" marker in the profiler. It's not specific enough for us to have any idea about the problem you are facing. The important bit to report is the name of the marker that appears above it.

    As an analogy, it's like the difference between "I pressed a button" and saying which button. I appreciate this isn't necessarily obvious, as it's a technical detail - we are continually working on making profile marker names as meaningful as possible.

    A couple of examples:

    https://forum.unity.com/threads/extremely-slow-editor-in-2019-2-0a7.640354/page-3#post-5274540
    In this post, the important bit is WaitForTargetFPS. This is Unity saying "I can run faster than the target framerate, so I need to wait a bit to make sure we run at the requested FPS. This isn't a bug.

    https://forum.unity.com/threads/extremely-slow-editor-in-2019-2-0a7.640354/page-3#post-5123180
    This is the one I fixed, where Canvas.BuildBatch was waiting for rendering to finish on another thread. This wait is now totally gone.

    https://forum.unity.com/threads/extremely-slow-editor-in-2019-2-0a7.640354/page-3#post-5294883
    This one appears below Gfx.WaitForPresentOnGfxThread. Usually, this means that the GPU is the thing limiting your framerate. This means it's probably time to use a GPU profiler, or other means to analyse how many vertices/pixels/big textures/etc you are asking to be drawn. Or maybe the frame stats will tell you that you are drawing way too much stuff. Etc.

    Disclaimer: I can't recall whether waiting for VSync will look like the first or the third example I shared. (Or a totally different example) VSync is also not a bug - it's your game running in sync with the monitor refresh, and not going too fast, to avoid tearing. (the monitor showing parts of multiple frames)
     
  43. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,618
    Thanks for that. It's a very good explanation of what's going on.

    Semaphore.WaitForSignal is a prime example of really bad information, because it only means "we're waiting for something else".

    If you could mark some of the WaitForSignal calls with Profiler.BeginSample/EndSample, and give those good names ("waiting for GPU", "waiting for vsync"), it'd help a lot of beginner/intermediate developers out a lot, since they'd have much better things to google for.

    Searching for "Semaphore.WaitForSignal Unity" will give you an long string of forum posts consisting of the one-eyed misleading the blind.
     
  44. mrstruijk

    mrstruijk

    Joined:
    Jan 24, 2018
    Posts:
    23
  45. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,887
    Unfortunately we've just finished our last patch for 2019.2 because 2019.3 is out, and my backport didn't get processed in time.
     
  46. mrstruijk

    mrstruijk

    Joined:
    Jan 24, 2018
    Posts:
    23
    Is it in the 2019.3?
     
  47. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    1,887
    Yes
     
    mrstruijk likes this.
  48. Yakirbu

    Yakirbu

    Joined:
    May 7, 2015
    Posts:
    19
    Using Unity 2019.2.15f1,
    Built on Android device, IL2CPP build.
    Please notice the Gfx.WaitForPresentOfGfxThread is taking 43.02 ms every frame
    dropping FPS to almost 15.
    this is a mobile game, profiler is connected to the game that is running on samsung note 5.

    Can't profile the GPU as you can see.
    What causing it and how can I get rid of it?

    * It doesn't happen on editor


    upload_2020-1-29_21-19-38.png
     
    Last edited: Jan 29, 2020
  49. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,618
    That's got nothing to do with this thread. This is about slow editor performance, your problem doesn't happen in the editor.

    It's just your CPU waiting for your GPU to finish, meaning that your graphics are too much for the phone to handle.
     
  50. sand_lantern

    sand_lantern

    Joined:
    Sep 15, 2017
    Posts:
    189
    Then please start a new thread. This is an unrelated issue.
     
    richardkettlewell likes this.
unityunity