Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. We are looking for feedback on the naming of a new user research platform that we are working on.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Was reading about compiler performance with C++ and lots of small files, does DOTS suffer from this?

Discussion in 'Data Oriented Technology Stack' started by Arowx, Apr 3, 2020.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    7,552
    In C++ when you have a large project you can have hundreds of code and header files to compile which can cause significant overhead as these are often very small files that may need to be parsed multiple times (e.g. like "using Unity;").

    In general I believe C# is considerably faster at compiling than C++, however Unity does employ C++ compilation via the IL2CPP build process.

    My thinking here is with DOTS potentially generating a lot more smaller code files e.g. one per system as opposed to multiple functions per object.

    Q1: Could large projects therefore become slower to build and compile with DOTS than with Monobehaviours due to the shear number of code files and using headers?

    Q2: Has anyone experience really slow build times with larger DOTS projects than they have with similar scale Mono projects?

    Q3: Considering IL2CPP what could Unity do in the build process that would maximise minimize compile times e.g. consolidate or Unify* the source files with common dependencies?​

    *Unifying or combining source files is sometimes used with C++ to speed up build times but at the cost of rebuilds as smaller changes need larger re-compiles.
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    2,603
    Go look at il2cpp output, they are not small files o_O
     
unityunity