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. Dismiss Notice

The unity is getting VERY, VERY slow.

Discussion in 'Editor Workflows' started by FernandoMK, Mar 18, 2021.

?

Unity is getting slow for you too?

  1. No,

    43 vote(s)
    1.9%
  2. Yes a little.

    232 vote(s)
    10.1%
  3. Yes a lot.

    2,025 vote(s)
    88.0%
  1. FernandoMK

    FernandoMK

    Joined:
    Feb 21, 2017
    Posts:
    173
    Hello, I believe that many people have already talked about it. but in fact, this is starting to hinder me too...

    Unity has always been a perfect alternative because of its iteration speed. for example, unity 2018 was great, but from there, unity started to get extremely slow to work...
    Currently my workflow is always interrupted, even by a simple click on the screen, it makes unity freeze for a moment, and it gets in the way.:(
    And I know that currently programming is a "real torture", because the compilation time is VERY long...

    Any way to improve it?
     
  2. John_Leorid

    John_Leorid

    Joined:
    Nov 5, 2012
    Posts:
    624
    Yea, I profiled it, most time is searching through the asset database and launching all assets, such as
    Text Mesh Pro, which seems to generate Meshes after recompile,
    ProBuilder, which also seems to create meshes,
    New Input System, which builds objects (classes for event handling, I guess),
    Even the Loading Bar gets updated after a recompile.
    And all classes getting deserialised, all scripts on all objects - so the old ones are thrown away, causing massive loads of garbage that has to be cleaned up and that takes a big chunk of the recompile time.

    And of course all the assets from the assetstore that implement [SerializeOnLoad] or [SerializeOnLoadMethod] - all these methods are called and all those assets initizialize their system, Gaia, Odin, Peek, and your custom tools, if you've written any.

    Thats the recompile.

    While using the editor - it depends. You can profile this on your own by switching the profiler to "Editor" on the top left dropdown field. In our case, it was a custom tool, that caused some lag, the editor itself (V 2020.1.17f1) runs quite smoothly and we have 29 Scenes, all loaded at the same time with a total of 104,376 individual GameObjects.
    Looking in certain directions causes a lag sometimes but thats on the GPU side, as far as I can tell.

    Opening an inspector can take some time too, a second or two .. but the core workflow of moving stuff, looking at stuff, navigating the scene view camera is actually quite smooth.

    Recompile takes 30 sec which is quite horrible for me, the programmer xD

    So I guess you have to profile it.

    Btw. My PC is 5 years old by now, got a new GPU ( 3070 ) but everything else already quite old, so maybe thats a bug on your side?

    Possible improvements:
    - Reducing the size of the assetdatabase by deleting assets you don't use.
    - Not having 100k Objects visible at the same time (unloading some scenes)
    - Checking 3rd party assets and custom tools if they affect the editor performance and removing them from the project, if possible
    - getting better/faster hardware, CPU with strong single core speed, as a lot of the editor runs on one thread + super fast SSD as well as a good GPU, depending on your game
     
    BrianJiang, mhmtbtn, fjolne and 3 others like this.
  3. FernandoMK

    FernandoMK

    Joined:
    Feb 21, 2017
    Posts:
    173
    In another topic, I managed to resolve the random freeze time that the unity cause, now it doesn't interrupt me that much. That's great...:D
    Well, our team is using unity 2020.3 now for production, and the editor is much more responsive. only the workflow that is eventually interrupted (Aplication.Load / Reload / Tick / ...)
    My pc is not that old, (Still, investing in an SSD can solve my load problem)

    Interesting, these 3 packages are part of my current essential kit for any project, maybe it is their fault that my unity is slow.o_O
     
    ALIENPANDA likes this.
  4. John_Leorid

    John_Leorid

    Joined:
    Nov 5, 2012
    Posts:
    624
    Now I'm curious, please post the link to the other thread here ^^
     
  5. FernandoMK

    FernandoMK

    Joined:
    Feb 21, 2017
    Posts:
    173
    uzisho and John_Leorid like this.
  6. FernandoMK

    FernandoMK

    Joined:
    Feb 21, 2017
    Posts:
    173
    In other parallel discussions, I saw unity is trying to improve the workflow. mainly in relation to Domain Reload.o_O

    https://forum.unity.com/threads/unity-future-net-development-status.1092205/page-2#post-7042942
    https://forum.unity.com/threads/hardware-benchmarks-5800x-8400-10900f.1075852/#post-6985952

    It is good to see that Unity is trying to improve this workflow problem:)

    As I commented at the beginning of the post, it would be nice to use the editor without being interrupted. as far as i know, several things could (or should) work in parallel. That way you could resolve some of those abrupt interruptions.
     
  7. FernandoMK

    FernandoMK

    Joined:
    Feb 21, 2017
    Posts:
    173
  8. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    927
    According to their blog, the goal seems to be loading assets on demand which they showed off when they introduced asset pipeline 2 and it would be pretty good especially for upgrading big projects or maybe importing asset packs.

    Currently, I do feel the import times have become much better, just the extra features in HDRP have been slowing down scenes pretty consistently, I was surprised to see a scene running at 70fps in 2021.20b2 go above 200fps in 2019 LTS. I was thinking maybe my rig is getting old:confused:, so I have switched back to 2019 LTS for now.

    Really hope unity crackdown on these problems in 2021 LTS, I am kind of excited to see a blog post named "The Road to 2022" sometime in one or two months.:D
     
  9. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,145
    Unity editor is becoming slower and slower !

    Even if you click with the mouse on another panel or on a prefab or something, it shows Menu Item execute progress bar window which can stay for a few seconds and this is repeating over and over and over... and this is with a 16 thread 16 Gigs ram and RTX3060 laptop

    Then editor gets crazy and the editor loop starts to take 150ms for like 5-10 seconds and so much more.

    Not to talk how long it takes to run the game in editor and that new feature which disables Domain Reloading simply breaks the game !

    Also custom layouts, oh man, you change layout and you start receiving error messages

    A lot of issues ( LIKE A LOT ! )

    I am amazed in how bad peace of software is this game engine turning into !

    Unity should use "Hold On" for motto

    Don't want to sound offensive and i'm not but it's just so frustrating to use the editor now

    upload_2021-8-18_13-57-28.png

    It's awesome :) :) :)
     
    Last edited: Feb 21, 2022
  10. FernandoMK

    FernandoMK

    Joined:
    Feb 21, 2017
    Posts:
    173

    This particular issue is a bug that is already being worked on by an internal Unity team. No one is sure what causes this.

    But it seems to be caused by a lot of different things, hopefully they can fix it before the 2021.2 release
    It is recommended to always send the bug report when this happens to you.

    (This is the main tread where they are collecting the information to solve this problem :)
    https://forum.unity.com/threads/editor-progress-bar-stalls-request-for-bug-reports.1137817/
     
  11. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,145
    Yeh i don't trust UT anymore... i've been incredibly supportive for many years, but not anymore !

    It's just like - start to create even a small project, you bump right away into issues

    Unity is waiting for users to find their issues, it's like wait, do i work at Unity... if i have to report every issue i find i wont have time to work on any project...

    I understand user reports are normal in general ( EPIC does it as well ) but oh man this is apparently NOT WORKING :D

    Every next version i install is worse than every previous since Unity 5...

    May be it's just me ?as always? idk :D
     
    TorbenDK, akuno, starikcetin and 3 others like this.
  12. FernandoMK

    FernandoMK

    Joined:
    Feb 21, 2017
    Posts:
    173
    I almost never have problems in Unity (I work with Unity since Unity 5.1). And I consider it quite stable for its level of complexity.:)

    When I created this thread (About Unity being slow), I was referring exactly to this problem that all Unity users are having in 2021.1 and now in 2021.2, with the reload domain, and these annoying warnings that we are always facing (as already pointed out by you). And Unity has already managed to reproduce some of these problems and others have been fixed.

    I agree with you, I don't like it when something bad happens to me either, but at least I report the problem to the unit, because then I know they can reproduce and fix my problem. It would be much worse to find the problem, never report it, and then complain that the problem is not fixed. Or do you expect them to test all the billions and billions of possibilities... because that is unfeasible for any company in the real world, including the unity
     
    Vagabond_ and Ruchir like this.
  13. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,145
    For a multi million in cash company i will expect that yep...

    How it's possible that i bump into lots of issues myself while simply navigating Unity and try some new thing or start use some of the systems...

    I am jut saying that it feels like they develop something and just throw it to users and then oh i have to again report a simple and obvious issue. Not to talk how long it takes for a lot of the issues to get fixed and not to talk how many regressions there are after this and also with old fixed a lot of new bugs are present

    I am not talking about issues that are hard to find, they are just there and obvious

    Unity Engine feels like a student project to me that didn't pass any QA

    They just have wrong decisions and wrong priorities imo

    Again i state all of this because i am just disappointed and i used to love that game engine and did report a lot of bugs and i also won an awesome reward for unique report... :)

    EDIT : feel kinda bad for this so i am not spamming the thread anymore. Cheers :)
     
    Last edited: Feb 21, 2022
  14. Hoorza

    Hoorza

    Joined:
    May 8, 2016
    Posts:
    40
    Hi Folks. Just to share my discovery. I was getting really frustrated about the speed of reloading scripts and entering Play Mode in an empty project in Unity 2021.1.26. I tried many things and I was ready to accept it. I had some problems with my Visual Studio 2017 at the same time too. I decided to uninstall the 2017 edition and install the new 2019 version. Speed has improved greatly for an empty project. I don't know if it was a matter of a fresh instal or there are some improvements in the 2019 version but it is worth a shot. On SSD drive the whole process took me less than an hour. Hope it helps. Cheerio!
     
    FernandoMK and jonathans42 like this.
  15. FernandoMK

    FernandoMK

    Joined:
    Feb 21, 2017
    Posts:
    173
    Hoorza likes this.
  16. hesa2020

    hesa2020

    Joined:
    Jul 27, 2011
    Posts:
    261
    Hey i just wanted to share this with you guys, i usually work on windows and it is super slow.
    I just decided to install unity on my macbook which is quite old ( 2017 ) and i have to say that i am very impressed its day and night difference, everything feels instant with no slow down on workflow. ( using 2021.3.21f1 on both mac and windows ).

    I am guessing unity dev mostly use mac.
     
  17. Marcusmvc

    Marcusmvc

    Joined:
    Jul 3, 2019
    Posts:
    1
    My Unity started to get slow when processing but not using the HD when i put
    using UnityEngine.EventSystems to put a script in a game object.
     
  18. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,145
    Hey,

    here's a proof of Unity editor scene view drawing and custom inspectors are a big hit for the editor performance...
    As i did post many times the editor struggles with custom inspectors... i myself had an issue with a custom inspector ( i think i might have mention this above )...

    Check what's the difference with the scene view gizmos and custom inspector enabled/disabled in the video...
    Having both scene view gizmos and custom inspectors enabled just smashes the editor performance as opposite of having them both disabled... there's no other game engine out there that struggles with gizmos and inspectors...

    It's hard to notice because of the screen capture, but the custom LODs component inspector makes the editor slower... having it disabled boosts the viewport a lot... Having the scene view gizmos enabled just brakes the scene navigation when having the LODs custom inspector set to Normal, though having gizmos enabled and LODs inspector to Debug it's quite faster...

    Check at 0:17 m

     
    Last edited: Feb 3, 2022
    danidina330 and lclemens like this.
  19. zachseven

    zachseven

    Joined:
    Dec 18, 2016
    Posts:
    15
    Had this issue myself.
    Increase the 2D Atlas Size Cookie Resolution to 1024 or 2048 in settings.
     
  20. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,790
    In older versions, Unity crashed without showing progress bar. the newer versions just added a progress bar when crashing

    Sometime is longer in the new versions because of the new design. For example compiling shaders are too long since unity 5.5 because of the shader variants. But the result is a better support for multiplatform.

    Also with a Samsung 980 Pro m2 drive and a Ryzen 5 CPU, i have no crash or progress bar for more than 1 second

    Also the unity 2021 and 2022 is too much faster than before in all cases

    Old asset importer was too slow when you wants to switch between platforms. But the new one is very faster

    Script compiling is much faster in the new editors

    In overall, old editors (5.4 and older) was very very faster than the newer but the features are too much more in the latest versions
     
    FernandoMK likes this.
  21. DetaPlayFounder

    DetaPlayFounder

    Joined:
    May 10, 2022
    Posts:
    14
    I would like to add my experience. Unity should hire some actual Quality personnel to discover their own issues but this is what i have found.

    2017.4.10f - unity ran perfect totaling 400fps to 1000fps in my current project.

    upgraded to 2021.3 LTS - frame drop to 60 fps to 100 fps.
    UNITY PROBLEMS FOUND

    1. MEMORY LEAK on animator components (fix - cull completely, all animators that are not visible to camera. This stopped the memory leak, giving back 200 frames per second)

    2. Mathf/Vector3.SmoothDamp is drastically slower. Every speed related variable needed to be decreased by 0.2f. (Edit: Found that Unity no longer adds in Task Delays into Time.deltaTime. Add in manually to the parament of Smooth Damp)

    3. Time.deltaTime is drastically slower compared to 2017.4.10f project ( this is due to unnecessary features that are Active and unknown to user.)

    4. All sprites - on first appearance - revealed as self lit blue (work around - generate mipmap per texture even when unnecessary).

    5. Switching camera by toggle (A off, B on), results in Black screen ( work around - set camera depth, never shut off Main camera).

    Although, I have only listed 5 items. These 5 are highly used and can destroy a project forever. The work arounds are annoyances that add surplus to workflow and tribute to bad practice.
     
    Last edited: May 11, 2022
    xmarleauFFG likes this.
  22. HelloMeow

    HelloMeow

    Joined:
    May 11, 2014
    Posts:
    279
    I'm working on a couple of projects both in versions 2017.3 and 2021.3 and the difference is huge. Compiling and assembly reload takes like 5-10 times as long in 2021.3.

    It's really annoying to have to wait up to 20 seconds every time after making a small change.
     
    t-ley likes this.
  23. Stilt634

    Stilt634

    Joined:
    Sep 25, 2021
    Posts:
    1
    I was working on a lego mod which i ddint touch for 6 months and now its like soooooo laggy

    like every time i use the mouse to move the viewport cam, it lags like 1 fps
     
  24. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,145
    It's indeed much slower !
    However, if you need to get it working, try to disable the viewport gizmos and see how is the performance then, just as a test, to be aware of the issue if that's the case in your project !
     
  25. suntabu

    suntabu

    Joined:
    Dec 21, 2013
    Posts:
    76
    We encountered the same issue. After upgrading to Unity2021.3 LTS verion, our project became very laggy and freezy.
    I profiled the background stack trace, and found this:
    企业微信截图_16534459336673.png

    企业微信截图_16534460223578.png


    But haven't got a clue about how to solve this issue yet, please help :)
     
  26. TOES2

    TOES2

    Joined:
    May 20, 2013
    Posts:
    135
    I solved the slowness problem by choosing another engine. It is free too, so win-win I guess :)
     
  27. FernandoMK

    FernandoMK

    Joined:
    Feb 21, 2017
    Posts:
    173
    I like it when people just talk about changing engines as if it will solve all the problems, when in reality it will just waste me more time and money and sooner or later it will make us run into some other wall in another engine. ;)
     
    HeizenblogGaming likes this.
  28. TOES2

    TOES2

    Joined:
    May 20, 2013
    Posts:
    135
    I'm way into development on another engine now after ten years watching Unity becoming a slow mess, and I am loving every second of it. It's like a stone has been lifted off my chest not having to spend every second watching loading bars. Never turning back ever.
     
  29. AnimalMan

    AnimalMan

    Joined:
    Apr 1, 2018
    Posts:
    1,164
  30. iagofg

    iagofg

    Joined:
    May 23, 2013
    Posts:
    5
    If slowdown is caused by newer features, maybe they should allow to disable some or all of that features in newer versions,.. because Unity 2022 is... even... s-l-o-w-e-r...
     
    ChiuanWei and OCASM like this.
  31. AnimalMan

    AnimalMan

    Joined:
    Apr 1, 2018
    Posts:
    1,164
    Opening a new project i am on 11:03 right now





    finally complete at 15 mins.
     
    Last edited: Aug 24, 2022
  32. Haapavuo

    Haapavuo

    Joined:
    Sep 19, 2015
    Posts:
    95
    This project (Finnish Army Simulator) will be the last larger project that I will work on Unity. This is unbearable. I am spending 1-2 hours per day just waiting for Unity to "do something" in the background... Windows 10 + AMD 5950X + GTX 1080 + 64 GB RAM.

    Unity sure is capable engine for some hyper casual mobile games but at its current state definitely not capable of handling larger projects like ours. We have around 40 GB of various assets and thousands of code files.
     
    socialtrens, Ruslank100 and SunnyChow like this.
  33. centaurianmudpig

    centaurianmudpig

    Joined:
    Dec 16, 2011
    Posts:
    91
    So many threads on this issue, I was actually looking for another one because someone had posted a solution that worked for me and I wanted to confirm it worked.

    The solution was to turn off Directory Monitoring under Preferences. With it on, every time I recompiled scripts the Editor would slow down a bit more each time until it took 30 seconds to recompile scripts (start to finish), and then another 20+ seconds to get into play mode. With it disabled it does not slow down anymore.

    The 2nd thing that also seems to slow down the editor (regardless of turning this setting off) is recompiling scripts while you have the Prefab Editor open. The same effect slows down from each recompilation, regardless of Directory Monitoring being disabled.
     
  34. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,194
    The directory monitoring being bad for performance is very strange, as it's supposed to be an optimization.

    If you look at the tooltip, it's:
    upload_2022-9-13_10-28-22.png

    In short, Directory Monitoring uses a Windows API to get notifications about files having changed. The alternative (which is what Unity used to do always) was to scan through all of the files to see if they had been updated.

    So if it's consistent that turning it off is an improvement, then somebody at Unity would probably very much like to see your project!
     
  35. AnimalMan

    AnimalMan

    Joined:
    Apr 1, 2018
    Posts:
    1,164
    In the time that it takes to Copy Template Library, I am able to copy my entire Unity Directory from C to F drive :)

    I just have so much time to surf the forums and comment while i wait


    On the brightside Is Unity getting slower? at the time of writing this

    1,136 vote(s) YES - MUCH SLOWER
    87.6% of participants.
     
  36. Stadob

    Stadob

    Joined:
    Jun 20, 2014
    Posts:
    4
    This thread is one year old. And problem is even worse
     
  37. felizdisla

    felizdisla

    Joined:
    Mar 26, 2020
    Posts:
    2
    October 2022 same problem....
     
  38. nfauvet_ubi

    nfauvet_ubi

    Joined:
    Jan 18, 2019
    Posts:
    6
    We had a lot of issues with Visual Studio 2022 paired to a Unity 2022.1, when trying to debug.
    Extremely long time to launch Play after attaching to the process, and even complete freezes.
    We mostly resolved that problem by going back to Visual Studio 2019.
    I guess it could be seen as OUR fault for not staying with LTS versions and officially supported VS versions...
     
  39. lightphaser

    lightphaser

    Joined:
    Feb 14, 2019
    Posts:
    3
    I have just upgraded to the latest recommended stable release and it got very slow. The worst part is the build time, which got triple slow or even more beyond that... I must add, that i am using it on a i7 8 core processor, so that should not be a problem.

    I am definitely sure the whole process could be optimized to run much faster and smoother.
     
  40. Reahreic

    Reahreic

    Joined:
    Mar 23, 2011
    Posts:
    254
    You think 30s for the editor is slow, have you tried to generate a build in 2022... what used to take 5mins now takes 2+ hours.
     
  41. unity_QJ7RazXzghZCzA

    unity_QJ7RazXzghZCzA

    Joined:
    Jul 9, 2021
    Posts:
    100
    Fix this editor for the hell if not for the God!
    How long we can suffer? We just lost our lives while waiting for this S***ty editor to load things again and again!
    I want just do my work. I dont want to explain to my boss why simple tasks takes so long!
     
    JasonDaze and Vagabond_ like this.
  42. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,988
    still using mainly 2019.4 because of this.. ><
     
  43. Mohammadreza55555

    Mohammadreza55555

    Joined:
    Jul 30, 2016
    Posts:
    8
    Unity 2021.3.13f1 is still slow in importing, reloading, and...

    Windows 11, amd ryzen 3950x, 64GB 3600mhz 16cl, RTX 3070 ti

    Importing small assets 200MB takes 40m
     
  44. rongxike

    rongxike

    Joined:
    Nov 26, 2015
    Posts:
    4
    It looks like it tries to connect to a cloud while compiling the code. When I disconnected my internet (due to some reasons), the compiling process is terrible slow... then it gets back to normal when I connected... why?
     
  45. bouemama

    bouemama

    Joined:
    Dec 6, 2016
    Posts:
    18
    this is what i do to fix this issue on my side Windows=>Analysis=>profiler (make sure the record button is not ON and and profiler is not active )
     
  46. QGGameDesign

    QGGameDesign

    Joined:
    Aug 28, 2020
    Posts:
    8
    confirm I've been sticking to 2018.4.36 as even creating an empty project on 2019 > takes easily 10 times longer than 2018, and the workflow only goes slower from there.
    And no thanks, I'm not gonna take a "We just added the loading bar, It's the same time" response. It is measurably worse and it has been thoroughly documented for years now.
    Get to work Unity Technologies, your current practices and the current state of your competitors spell Doom for UT in the long run.

    Isn't it lovely how no Unity team member replied to this year-long thread
     
    Last edited: Dec 22, 2022
  47. QuatNutDsTroya

    QuatNutDsTroya

    Joined:
    Jan 21, 2023
    Posts:
    3
    Unity Software Inc stock price has been falling from its peak sale price of 200 a stock on November 2021, down to 31 a stock.

    it approximately aligns with the reduction of quality seen in in the Unity editor, and the introduction of the hub. Including the package resolver which uses a loading technique that takes 10 minutes to open a project. And then proceeds to fill that project with spam packages you wouldn’t use anyway.

    stock at unity for that previous version were worth 189 i believe at their peak November 21st 2021. Unity staff members likely receive shares as a form of dog biscuit. And so internal incentive to play those stock values may exist. Likewise it’s San Francisco style Human Resources management and social editing teams are heavily romanised further reducing the value of the company.
     
    JasonDaze likes this.
  48. QuatNutDsTroya

    QuatNutDsTroya

    Joined:
    Jan 21, 2023
    Posts:
    3
    ?


    the price of Unity subscription increased to 145 a month. That it reclaiming the missing share value. From its peak at 189. So you the original peak stock price is important to the maintenance of the staff, so the Unity price had to increase December just gone otherwise entering the new year with a stock price as low as Twitter at its death, it’s a fragile situation.
     
  49. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    1,861
    Sorry, I just assumed since your first two posts on the forum were so far off topic, you were an alt-account of a known troll. If you could take the market analysis over to some reddit wall street thread, and out of the Editor Workflows forum, that'd be great.
     
  50. QuatNutDsTroya

    QuatNutDsTroya

    Joined:
    Jan 21, 2023
    Posts:
    3
    i think it is relevant to the drop in quality of the product. When Twitter died it had 2500 employees, stock price 30. Unity has 5,864 employees and Stock price of 30. Product quality declining

    The decline coincides with the last 2 years of degeneration as pointed out by users in this thread, with some 1000 or more voted that unity is much worse in the poll.