Is there a way to increase script compile speed?

  1. Use More powerful CPU?
    How much speed can increase if I use desktop i5 760 @2.8GHz rather than laptop cpu i5 4200u @1.6GHz?
    I feel 1~2 second more faster in case of desktop.

  2. Input to Standard Assets folder?
    I googled and someone says put stable codes at [Standard Assets] folder and unity will not compile in that folder if the scripts inside of it didn’t changed.

Is this true?

  1. Any other good way?

Thanks.

This will help, although I suspect that you will notice more gain if you go for an i7 chip. Also having a reasonable amount of fast RAM can help.

Compiling your scripts to DLL’s can help to reduce compilation time since they are already compiled.

Scripts in C# or use DLLs

1 Like

I’ll second this. In our experience, C# compiles significantly faster than Boo. I wouldn’t be supprised if it’s also faster than JS.

I am writing in C#.

But not use .DLL

I have a large part of my project in a dll, when the project compiles it has reduced the speed significantly. BUT, when I recompile said dll and bring it into the project, it takes EXTRA long. So editing the code in said dll actually takes a bigger impact (it also gives you debugging issues as you can’t easily jump to the line where code failed from unity, or put breaks in the code. You can however, as long as the pdb/mdb are included, step into the code).

My project that’s not in the dll’s is still fairly large, and is a mix of js and C# (mainly because my artist keeps ganking small code snippets off the internet and just slapping them in the project with out asking me first… grrrrr, talk about debugging nightmare!).

My compile times are usually very low, if not even noticed. If I do big changes around the entire project I ‘might’ get a 3 or 4 second compile time.

I also run on an i7-2600K @ 3.4ghz, with 32 gigs of RAM. Which probably plays a big role in that.

Just stick your scripts in a ‘special’ unity folder like Standard Assets or Plugins and it should reach dll speeds in compilation. Or come pretty close since they don’t get recompiled unless fiddled with.

I’m on a mac pro quad core 3.7GHZ with 32GO of ram and I can see on my activity monitor spike at 99% of the cpu from MONO … :frowning:

Yes, that sounds normal; why the sad face?

–Eric

The massive spike is Mono compiling at full speed. Would you prefer it didn’t try to use all your available resources? What would be the point behind a fancy processor and large quantities of memory if your computer wasn’t able to use it all?

I simply don’t understand this type of logic some people seem to have. It’s a good thing for it to do this.

I understand your point, it’s because I didn’t mention something : it takes 1 to 3 minutes each time i change something in my code… :frowning:

Ah. Now that I don’t know anything about. Changing scripts does have a little blip for me, but it’s only a few seconds.

1 Like

It should be great to have a console to see what unity do :frowning:

I take a screenshot of my logs in the activity monitor :

2298587--154703--Capture d’écran 2015-09-16 à 17.52.21.png