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

Unity's Build process is too unoptimized.

Discussion in 'General Discussion' started by peq42, Aug 12, 2023.

  1. peq42

    peq42

    Joined:
    Mar 4, 2022
    Posts:
    72
    In my old setup, I had a Ryzen 5 3600, 16GB of Ram(DDR4, 2666Mhz) and all files on a Sata SSD(500MBps read/write).

    In my new setup, I got a Ryzen 7 7800x3D, 32GB of Ram(DDR5, 6000MT, CL36) and all files on a NVMe PCIe SSD(2.1GB/s read, 1.7GB/s write).

    Building my game, no matter the platform, would take around 7-8 minutes on my old system. On my new system, which is about 2-3x faster on EVERYTHING, it takes the same amount of time.

    Can someone explain to me how is this possible? Even the most un-optimized, single-core-designed system should be AT THE VERY LEAST 50-100% faster in this machine.
     
    Last edited: Aug 12, 2023
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,082
    What do you mean by deploying? Do you mean making a build? Because based on my own experience of upgrading (3600 w/ 32GB -> 5950X w/ 64GB) it should be a visible decrease in the time it takes to do so.
     
    Last edited: Aug 12, 2023
  3. peq42

    peq42

    Joined:
    Mar 4, 2022
    Posts:
    72
    yes, and I expected the same decrease... but didnt get any
     
  4. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    2,980
    The build process seems to be dependent on the performance of one of your CPU cores and the storage. You should definitely get better performance from your new system, even if Unity's build process does not really take advantage of many CPU cores at once.

    If your new system is not significantly faster when building the same Unity project, you should spend some time testing and tuning your new system.

    For example, exclude your Unity editor folder and your project folder from Windows anti-malware.

    Have you installed all of the AMD chipset drivers?

    Make sure you have your best RAM profile selected in your motherboard BIOS, which is XMP on Intel or EXPO on AMD.

    Make sure your CPU is not overheating and throttling during heavy workloads. Run CPU-Z while you are running the Unity build. Does your CPU hit it's target frequency when it is under load?

    Modern CPUs operate more like modern GPUs. They look at a variety of factors to decide what clock speed to run at. AMD's official comment regarding real world factors is here:
    https://www.amd.com/en/support/kb/faq/cpu-pb2
     
  5. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,453
    You are not comparing a cold build with a warm build, right?
    Like the first build after starting the editor (and think also if you chose clean build), takes significantly longer than subsequent ones.

    Btw. look into the taskmanager CPU load in the overview per core while building. You should see at least one core maxing out, otherwise the bottleneck is somewhere else.
     
    Max_Bol and CodeSmile like this.
  6. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    Check if your specs actually match the expected performance level. It is rather common for a PC build to perform well below what it could do by some simple BIOS setting, or not installing a certain driver, and so on. Generally it‘s advisable before and after upgrading to benchmark the existing and new system to see if any component’s performance does not match expectations.

    Also make sure you exclude the project location from any virus scanner, including Windows built in Defender.

    What platform are you building to? Are you building a debug/dev or a release build?