Search Unity

  1. Curious about what's going to be in 2021.1? Have a look at the 2021.1 beta blog post.
    Dismiss Notice

Feedback (Case 1161371) Compiling empty project takes significantly longer

Discussion in '2019.3 Beta' started by Peter77, Jun 9, 2019.

  1. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    701
    I'm still using the same PC I built in 2011 as my main development machine. It runs great. I never thought it would last this long but I'm still happy with the way it performs in nearly every way. Unity has gotten noticeably and significantly slower over the years. I can't say that I've noticed my PC performance getting significantly worse over the years with any other application I use.

    A couple years ago I started upgrading old projects to newer Unity versions when I realized the WebPlayer builds were no longer supported by any browser and I'd have to upgrade them to make WebGL builds. After I did that, Unity announced the LTS releases and I figured I might as well try to update them once per year to the latest LTS so they could stay current and playable as technology changed over the years.

    So for the past 2-3 years I've been taking projects that used to compile and build quickly when I originally worked on them in Unity 3.x, 4.x, or 5.x, and upgrading them to newer versions of Unity. Compile and build times have definitely suffered with each upgrade. The editor experience as a whole has suffered with each upgrade.

    All on the same PC I've had for nearly ten years, on which I haven't noticed significant slowdown otherwise.
     
    Last edited: Jan 12, 2020
    phobos2077, Lorash, Peter77 and 2 others like this.
  2. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    If 2020.3 goes to net core 5 in November, it will increase editor performance and compiling speeds significantly .
     
    Deozaan likes this.
  3. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    7,281
    Cool, what about people who want to work on their games within the next 11 months?
     
  4. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    1,965
    But this is what has in fact been changed.

    In Unity 4.x we didn't have as much Unity functionality on c# side. We are now talking about everything, even editor tooling. In past a lot of the stuff in editor that we have now on c# packages would have been done on native code side.

    Comparing 2019.3 compilation times to 4.x is bit silly IMO, these are not equal in functionality or how they work in that many ways anymore. If you really have to compare, at least take avg hardware a Unity developer had on Unity 4.x days and compare the times with avg hardware current users have on Unity 2019.3. Game engines always bloat along time, hardware gets better which also compensates these things a lot.
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    7,452
    I don’t understand why people find it so hard to believe that even under these circumstances Unity 4 feels much better to use.
     
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    7,452
    So I am done with the weak ass arguments in here:

    1. Roslyn is slower! (with no evidence to back it up, and turns out it's not).

    2. Can't compare! Look at all those release notes! Sure. Can we compare ANYTHING then? Can we compare 2018.2 to 2018.3? NO WE CAN'T LOOK AT ALL THOSE RELEASE NOTES : https://unity3d.com/unity/whats-new/unity-2018.3.0

    3. It's the package manager and stuff coming to C# side (although that really wasn't very true at all for 5.x). And uhhhh... sure, if the reason everything is slower, is the dependency hell package manager that keeps adding packages when I don't want it to and does not offer a practical benefit since most packages are tied to specific versions anyway so what's the freaking point, then... guess what. THE PACKAGE MANAGER WAS A MISTAKE.

    Software does NOT have to bloat. This is not a normal thing we just have to accept and if Unity's doing that THEN IT'S A VALID THING PEOPLE CAN CRITICIZE IT FOR and there's zero need for people to start pulling stuff out of their asses in order to make it somehow make "sense".
     
    laurentlavigne and Lorash like this.
  7. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    410
    Why do you think there is any probability of that happening in 2020.3? :)
     
    firstuser, phobos2077 and Deozaan like this.
  8. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    From Microsoft https://devblogs.microsoft.com/dotnet/introducing-net-5/
    Visual Studio, Visual Studio for Mac, and Visual Studio Code integration
    • Produce a single .NET runtime and framework that can be used everywhere and that has uniform runtime behaviors and developer experiences.
    • Expand the capabilities of .NET by taking the best of .NET Core, .NET Framework, Xamarin and Mono.
    • Build that product out of a single code-base that developers (Microsoft and the community) can work on and expand together and that improves all scenarios.
    I assume faster compiler and editor responsiveness.
    I'm interested if Mono could become fast as DOTS.
     
    phobos2077 likes this.
  9. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    410
    I meant why do you think there is any chance that unity will adapt net core 5 in Unity 2020.3 .
    Knowing unity it seems very unlikely to happen that soon, if ever.(for me)
    I thought maybe you know some info from unity side.
     
  10. Lorash

    Lorash

    Joined:
    May 6, 2019
    Posts:
    215
    I've just sent in my profile for a tiny project, with asmdefs everywhere, that is very sluggish in 2019.3.0f5 (case 1212215 *ninja edit*: made another one - case 1213483). Not an empty project, but a trivial project that's currently just a biped in a scene of less than a dozen cubes/planes/etc. and just a few C# components overall, yet Unity compilations and play mode takes several seconds each. VS (with Rosyln, obviously) compiles the project in the blink of an eye.
     
    Last edited: Jan 21, 2020
  11. aganm

    aganm

    Joined:
    Sep 25, 2019
    Posts:
    65
    I have this issues. I was using 2019.2 just fine (script recompile only takes 1-2 seconds max and then 2-3 into play mode), but when I use 2019.3, it's 5 seconds script reload and another 5 into play mode for a bare empty project. So annoying.

    I want 2019.2 performance with latest DOTS version.
     
    jdtec likes this.
  12. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,699
    I just encountered an extreme performance regression in Unity 2019.2 related to code compilation when the packages tab was open. Not sure if related in any way to this in any way: https://forum.unity.com/threads/hav...ation-time-by-15-20-seconds-in-2019-2.817080/

    I know it's not Unity 2019.3, but in my limited testing this doesn't happen in 2018.4. Maybe it's even worse in 2019.3?

    UPDATE: My issue seems to be fixed in 2019.3.
     
    Last edited: Jan 28, 2020
  13. Desoro

    Desoro

    Joined:
    Apr 30, 2016
    Posts:
    7
    2019.3 isn't usable like this. After a few hours of 20+ second wait times after every script edit, I reverted back to 2019.2.
     
  14. ekaralar

    ekaralar

    Joined:
    Jan 13, 2015
    Posts:
    14
    Great work Unity - my compile times have been skyrocketed even if I make a very simple change to one of my scripts, it takes more than 20 seconds whereas it was taking 6-7 seconds in the previous version: 2019.2

    No way I'm going to use Unity 2019.3 with its current state, it is impossible to change & test the code, you just broke it.
     
    Lorash likes this.
  15. Lorash

    Lorash

    Joined:
    May 6, 2019
    Posts:
    215
    Aaaand the cases I've sent in above got closed by support. I'm done.
     
    frederik_krogh likes this.
  16. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,527
    What did they reply?
     
    JamesArndt likes this.
  17. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,419
    QA wasn't able to reproduce the extreme regressions in enter playmode times (going from 6-7 to 20+ seconds) mentioned here. They asked for a reproduction project but didn't hear back, that's why the ticket was closed.
     
  18. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,419
    @Lorash any chance you could share the project with us?
     
  19. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,059
    This is outrageous...
     
    Lorash likes this.
  20. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Compilation can take 20+ seconds if you have big project almost finished.

    Compiling empty project, creating scripts, adding/deleting shader graph nodes should takes less than 500ms.
     
    Last edited: Feb 12, 2020
  21. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,337
    Has anyone that's experienced a severe regression from 2019.2 to 2019.3 actually sent a bug report with a repro project? Otherwise it will probably not get fixed.
     
    LeonhardP likes this.
  22. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    410
    Today unity 2019.3.1f1 has come.
    It seems like the compile time of script change now takes 6.5 seconds down from 9.5 (unity 2019.3.0f6) in my project.
    That is good news.

    Empty project compiles with 5.5 seconds.
     
    Last edited: Feb 12, 2020
    konsic and jdtec like this.
  23. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    254
    Are others seeing a speed-up with the latest version?
     
  24. aganm

    aganm

    Joined:
    Sep 25, 2019
    Posts:
    65
    I haven't seen any speedup. Compiling a 'hello world' script takes about 5 seconds from the script editor back into the unity editor. I want to use 2019.2 because the same thing happens almost instantly, but I really wish I could have the newest updates, specially for DOTS I'm stuck with an older version.
     
  25. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    410
    How much is this almost instantly? Less then 1 second?

    Edited.
    I have downloaded 2019.2.21
    And empty project script change compilation takes 6.2 second (2019.2.21).
    It takes 5.5 seconds in Unity 2019.3.1f1.

    So they are almost on same level.
    I do not know there you get almost instant results in 2019.2.

    I used Acer aspire 5 notebook (windows 10, ssd, 2.7 ggc processor)
     
    Last edited: Feb 15, 2020
  26. aganm

    aganm

    Joined:
    Sep 25, 2019
    Posts:
    65
    I mean the time it takes from doing any script change in Visual Studio and going back into the editor. When I save my changed script and click back into the editor, the editor freezes for a moment.
    In 2019.2.21, it freezes for about 500ms which means I can go back to using the editor almost instantly.
    In 2019.3.1f1, it freezes for about 5 seconds.
     
    Lorash likes this.
  27. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    7,452
    I do not understand why it’s the user’s responsibility to research, repro, report and ELI5 to make Unity a better product.
     
    Lorash likes this.
  28. BNJMO

    BNJMO

    Joined:
    Dec 6, 2015
    Posts:
    11
    I've always preferred Unity over other game engines because of its fast compiling time when editing scripts. It used to make the working flow very stable but now I find myself waiting long seconds for every line of code I change which, I notice, has a huge impact on productivity. This is definitely a very bad move from Unity's engine designers. As much I like the package manager, overall productivity shouldn't have been sacrificed.
     
    SirIntruder, Lorash and interpol_kun like this.
  29. SamOld

    SamOld

    Joined:
    Aug 17, 2018
    Posts:
    233
    I'm also experiencing horrible reload times in 2019.3.2f1. It's making iteration painful in my tiny prototype project, and occurs even in a brand new project. A trivial script edit freezes the editor for about 14 seconds.

    The fact that the editor is unresponsive during this time rather than doing it's reloading in the background makes this an even worse experience because I can't even fidget with the scene view to pass the time or start preparing to test whatever change I've just made. Allowing a piece of software to freeze up as part of its normal operation is generally a terrible UX decision. I understand why it happens, but it makes for a painfully frustrating UX that breaks my flow when working.
     
    Last edited: Apr 7, 2020
    SirIntruder likes this.
  30. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    858
    Well, sure. It is not a UX decision, it is fundamental to how the editor runs right now, since most of it runs in the domain that is being reloaded. Future work might allow partial domain reloads and what not, but just want to make it clear that no-one at Unity just went "it'd be fine to lock up here".
     
    SamOld likes this.
  31. Lorash

    Lorash

    Joined:
    May 6, 2019
    Posts:
    215
    It's not a UX decision but the decision was made to run everything on the same thread. Anyone worth their salt can tell you in advance why this is a bad idea.
     
  32. SamOld

    SamOld

    Joined:
    Aug 17, 2018
    Posts:
    233
    I don't know the details of how the domain reload works, but it may not be possible to do in parallel like that. The editor UI is very tied into the loaded domain, as MonoBehaviours are just C# classes and all that. Maybe they could load the new domain in the background alongside the old one and then swap them out quickly, but if the reload process is more of an iterative update, or if the bulk of the time is going to copying over serialised data that would need to be cleanly synchronised, then that may not be a possibility.

    The fact that they were throwing around the 500ms figure does make this more frustrating. That indicates that they think they're not technically blocked from achieving vastly better performance, so I would like to see it worked on as a high priority, because the current situation definitely does impact my productivity.
     
  33. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    858
    You could run it on 1000 threads for all that matters, *all* managed threads are stopped in the current implementation.
     
  34. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    858
    Partial domain reload would be amazing. There is some .NET Core development towards that end. It's unlikely the Editor would move to .NET Core in the near to mid term but you never know.
     
    SamOld likes this.
  35. james_cg

    james_cg

    Joined:
    Nov 13, 2019
    Posts:
    9
    same problem with unity 2019.3.6f1.

    After profiling, I switched Asset database from V2 to V1, then reopen unity , now compiling time is faster !
     
    firstuser and Lorash like this.
  36. aganm

    aganm

    Joined:
    Sep 25, 2019
    Posts:
    65
    How do you downgrade Asset database? I can't find it.
     
  37. Lorash

    Lorash

    Joined:
    May 6, 2019
    Posts:
    215
    Project Settings->Editor->Asset Pipeline->Mode
     
  38. SamOld

    SamOld

    Joined:
    Aug 17, 2018
    Posts:
    233
    First impression here, this has made things about 50% faster for me! From 14 seconds down to 7. It's still painful, but a lot better. Thanks for suggesting this @cgwong! It's a bit uncomfortable having to switch to a deprecated system, though. Unity, what's going on with your shiny new system causing a major performance regression? That's not good.
     
    Lorash, TextusGames and Metron like this.
  39. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    254
    Wow downgrading the asset pipeline version for me worked too, back to 6 seconds from 13.

    EDIT: I wanted to note that this is basically an empty project in terms of assets, it's a hundred or so scripts and some debug rendering.
     
    Last edited: Apr 19, 2020
    firstuser and Lorash like this.
  40. OmarVector

    OmarVector

    Joined:
    Apr 18, 2018
    Posts:
    44
    bec of this issue, I will shift back to 2018 build, it doesnt make any sense to wait that long time to recompile any changes in the code, not sure how did you allow this by design from beginning?

    reverting back to the old Asset pipeline didnt speed up anything for me
     
    aganm likes this.
  41. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,053
    I have to use 2020.2 alpha, and there isn't even option to turn asset data base version back to v1 anymore. My starting time is significantly slower than 2017, 2019...
     
  42. OmegaNemesis28

    OmegaNemesis28

    Joined:
    Dec 1, 2012
    Posts:
    105
    2019.3 here. In editor script recompiling is not terrible for me but compiling out a binary is getting horrific.

    I make one line of code change and want to test on Windows standalone and/or Android and/or Linux? We are talking about 5+ minute compile times and the unity editor in complete freeze with no helpful status/progress indicators.

    It's nuts. Its only tolerable for so long. Not everything can be tested in editor.
     
  43. devilhunterxl

    devilhunterxl

    Joined:
    Dec 19, 2018
    Posts:
    6
    Have no idea how fast was Unity 4 or 5. But I've moved from 2019.1 to 2019.4 and see how much longer it takes to compile a single change in a script. Very annoying behaviour.
     
  44. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    4,610
    Joachim Ante talked about 500ms editor update time. How do you think they'll achieve that?
     
  45. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,059
    Never...
     
  46. BNJMO

    BNJMO

    Joined:
    Dec 6, 2015
    Posts:
    11
    This issue is clearly causing a lot of frustration in the community. I hope that Unity understands that and focuses its efforts towards making improvements in their future designs. I've been using Unity for 5 years now but I seriously started thinking about switching to another engine now. As an example, Unreal's visual scripting blueprint system (which I am not a huge fan of) is significantly faster. Even the long process of compiling C++ code became comparable in terms of time with Unity nowadays, which was just unimaginable a few years ago. Please find a solution to this.
     
    darthdeus likes this.
  47. darthdeus

    darthdeus

    Joined:
    Oct 13, 2013
    Posts:
    48
    I know this is just an anecdote and that I'm referencing an older post, but thought it would be funny to chime in. Just about a month ago I bought a much beefier PC than I had before, now with Ryzen 9 3900X, 64GB RAM and NVMe, with the intent of getting back into Unity dev after a little time off. What is funny is that everything is just waaaay slower on my new way faster PC than it was just a couple years ago on my S***ty old PC :(

    Iteration time going down due to performance regressions is truly one of the saddest things to experience in dev imo.
     
    TextusGames likes this.
  48. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,527
  49. aganm

    aganm

    Joined:
    Sep 25, 2019
    Posts:
    65
    No need to go as far as 4.6.
    Try unity 2018 LTS. It compiles script changes instantly. You just click back onto the Unity editor, and bam, it's ready. Unity 2019+? Click back on the editor and it freezes for 10 seconds.

    For that reason I've been wanting to go back to 2018, but I will have to say goodbye to all the good new features.. it's a difficult compromise. I really hope Unity will figure this out. It's such a pain to use right now.
     
    darthdeus and frederik_krogh like this.
  50. aganm

    aganm

    Joined:
    Sep 25, 2019
    Posts:
    65
    Some news from 2019.4.10f1 patch notes:

    Known Issues in 2019.4.10f1
    Scripting: [Performance] Slow asset refresh when modifying any script, 45 seconds on one line change (1270910)
     
    SamOld likes this.
unityunity