Juliean said:
One of the main things that makes Unitys editor so slow is the fact that its based mainly on C#, and C# can only execute via JIT. I've confirmed/found that out via their editor-profiler - most of the time spent after changing scripts etc… is first having to compile the C#, and then the JIT having to recompile (what I assume to be) everything, before the editor can resume running
That's not true! Yes, it uses C# but C# in isn't meant to be slow in general, it is more the way Unity handles the C# project. If you recompile the code then depending on how many Assemblies Unity creates, the code is rebuild from scratch and then loaded. This takes a few milliseconds on an avarage development machine. Then Unity starts to analyze all thecomponents you defined in code and matches those to components attached to scene objects and loads serialized properties to be set to every single component instance.
Not to say that they use a custom Roslyn compiler lokated in the Unity install folder.
Unity also hasn't any good dependency management, they just add every single assembly into every other assembly, regardless of if it is used. So you have round about 20 dependency assemblies in a single C# project.
Then it also depends on if you have Burst code enabled, this is another step after compiling the C# code using Roslyn, LLVM is triggered to analyze the generated IL and Burst compiler is called to convert the C' code into something running in parallel.
So one could say, it isn't the compilation process itself but all the analyzis Unity does which is slow
Juliean said:
For attaching the debugger, I'm not a 100% sure. It seems to be related to having to load the different symbols, but thats mainly a guess (sometimes my debugger just entirely hangs itself even if I let it run for 30 minutes).
Debugging is done via TCP connection (you can attach a Visual Studio instance to a running Unity game on another device for example Android) and since network is involved, even if you run it on local machine, this is slower than a native C# debugger
Zurtan said:
And which CPU is recommended
Doesn't matter as Unity is a crappy written piece of software! You can however do some optimization in your project to make it faster.
On emajor tipp is to separate everything into small but not too small Assemblies via Assembly Definition files. If you don't need to recompile the entire priject but some portions which involve Editor code, it is much faster in opposite to having every code file in the default Assembly