Search Unity

Feedback 2020.2: Compiling empty project takes significantly longer than in Unity 4.6

Discussion in '2020.2 Beta' started by Peter77, Aug 30, 2020.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,599
    During the 2019.3 beta phase I reported that Unity 2019.3 requires significantly longer to compile the empty test project than Unity 4.6 does.

    Today I retested to check whether it improved in Unity 2020.2.



    Results
    • Unity 4.6 = 2 seconds
    • Unity 2020.2.0a21 = 6 seconds
    • Unity 2019.3.0a5 = 6 seconds
    Conclusion
    Unity 2020.2 compiles the test significantly slower than 4.6. Unity 2020.2 compile times have not improved since Unity 2019.3.

    upload_2020-8-30_8-57-24.png
     
  2. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    314
    I read somewhere that compiling should be faster, but what takes up a lot of time is the domain reload, I think Unity has slowed down there.
     
  3. JamesArndt

    JamesArndt

    Unity Technologies

    Joined:
    Dec 1, 2009
    Posts:
    2,874
    Did we ever surmise what the cause of such a performance regression would be? Any Unity staff speak up on the findings?
     
    OmegaNemesis28 likes this.
  4. Creepgin

    Creepgin

    Joined:
    Dec 14, 2010
    Posts:
    411
    I'm sure the Unity folks are aware and working on Assembly Reloading performance. But I just want to say that I've been especially annoyed by Unity's iteration speed for years. It's sad to see the problem actually getting worse year after year. Unity, by default, needs to scale better as project grows.
     
    OmegaNemesis28 and JamesArndt like this.
  5. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,012
    IMO it would be more interesting to see how bigger projects build times have changed as empty project building isn't something most do or care about (and if it's few seconds longer, it doesn't really change anything).

    For what it's worth, I took oldest available Unity (3.4.0f4) and newest alpha (2021.1.0a4) and tried both on the oldest Unity project I have access to, which is Unity's old Car Tutorial (and there the alternative car model variant as it still runs on newer unity versions). After taking out same scripts from both (stuff that was unsupported on newer Unity) and made sure graphics etc settings somewhat matched with these, I did a build test where iterative build for this project took ~4 seconds on Unity 3.4 and ~6 seconds on 2021.1, so it was 2 seconds slower (not a big deal as this was still a tiny project). It's worth noting that Unity 3.4 builds against way older and simpler mono runtime so that probably explains some of this.

    While at it, I also tested upgrading this nonPBR project to URP 10.1 on 2021.1 which uses PBR rendering while kept the graphics settings somewhat the same, of course I couldn't dial down URP settings to be as simple as Unity 3.4 renderer was (for the ref, adding URP to the mix bumped the build time in this case by extra 2 seconds again, now totaling at whopping 8 seconds). When running this project's standalone x86 build on windows using Unity 2021.1 with URP averaged ~300fps higher than the old Unity 3.4 version, ranging from 950 to 1500 fps on 2021.1 when running highest graphics preset with forward rendering at 8x MSAA and vsync off. On Unity 3.4 it ran from 800 to 1100 fps. I'm deliberately reporting this in fps as it's pointless comparison anyway but yay for URP and 2021.1 I suppose :D
     
    Last edited: Nov 10, 2020
  6. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    4,918
    One of the dev on github said why: they have tons and tons of processes and tests before anything gets added to the main branch. It's a very different beast than back when they were 40 people.
     
    mahdi_jeddi likes this.
  7. Creepgin

    Creepgin

    Joined:
    Dec 14, 2010
    Posts:
    411
    @laurentlavigne Right, I see what you mean. But sorry, I wasn't being too clear. I was actually referring to Unity Editor's iteration speed (not the Unity team's productivity).

    The progress to <500ms iteration speed is probably still ongoing, one must hope.
     
    mahdi_jeddi likes this.
  8. JamesArndt

    JamesArndt

    Unity Technologies

    Joined:
    Dec 1, 2009
    Posts:
    2,874
    Unity has made a few blog posts this year where they do address having a team working on increasing the performance of the editor itself and decreasing the time to iterate on projects within the editor. Supposedly, the 2020.2 versions and forward have a focus on decreasing the time to iterate in the editor and increasing the overall snappiness and performance of working in the editor.
     
    stuksgens and Creepgin like this.
  9. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    68
    @JamesArndt I just downloaded Unity 2020.3 and it is dramatically worse than 2019.3, It's honestly getting to the point where I want to move away from Unity for any projects larger than ~1GB, because the time I spend waiting for things to load is getting untenable. We could always go back to older versions, but then we're missing out on critical new updates, QoL features and bug fixes.
     
  10. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,491
    We're currently investigating a couple of potentially related issues.

    More information in this thread.

    That being said, the issue we found might not be the same one that affects your use cases. If it's possible for you to submit a bug report with a reproducible attached, we'd very much appeciate it.
     
    stuksgens likes this.
  11. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    68
    Thanks Leonhard, that's good info. That seems like it will certainly help with recompilation, but I'm seeing slowdowns in most other areas too. It takes 15 seconds every time I want to inspect an animation avatar. I just downloaded a new 7.8GB project and I can't tell whether it's still loading, or whether Unity crashed. It's been an hour and task manager says that it's not responding, but it still has a progress bar. A build of my 2GB game usually takes 7 minutes or more, and that's without IL2CPP. Almost every element of Unity seems to get slower with each update.

    I know many of you are fighting hard internally to improve performance/editor stability, and I've been a huge advocate of Unity for years. It's just very frustrating as a customer that has spent a lot of time and money investing in Unity to feel like it might be a good idea to explore alternatives.
     

    Attached Files:

unityunity