Android IL2CPP build times really slow

How can be possible that an EMPTY project needs 13 minutes to build an apk? And on mono2x it’s 1 minute or less.

I was trying it on my Jenkins pipeline and I’m going to switch back to mono2x.

Really you need to optimize it because if you don’t do it, developers are not going to make the transition from mono2x to il2cpp.

Are you working on IL2CPP incremental builds? It’s not acceptable that you change one line of code and you need to wait 13 minutes on an EMPTY project.

2 Likes

I think this been discussed before, see if you can search for topics…

What hardware are you running on? 13 minutes sounds excessive, and I haven’t seen it to be that bad. We have incremental build support - does it not work for you?

One thing I saw help tremendously was having both target build directory and the project directory on an SSD. In my experience, that makes build times up to 4 times faster.

Other 2 things to check:

  1. Do you have any anti virus software running? Some of them slow down IL2CPP code generation (writing of C++ files) and then compiling them a lot - in my testing, disabling windows defender gave a huge speed up.

  2. For development, make sure to build for ARMv7 only rather than FAT (ARMv7 + x86). That will shave off compilation time in half.

I just updated my project to 5.5.0b11 from 5.3.6p8 and I too have noticed that Android IL2CPP takes at least twice as long (just gut feeling not actual measurement) than it used to. iOS seems about the same. I was an early adopter of Android IL2CPP even back when it was experimental, so I think I’ve done enough builds of my project to get a feeling for how long they should take. My system is a Quad-Core Macbook Pro with SSD.

Are you building ARMv7 or FAT packages?

Only ARMv7, I haven’t tested my app on Chromebooks yet, so I always remove x86.

Any chance you could do a real measurement? If you find that there’s compilation time regression, we’ll look at it.

I also go that feeling, early adopter here too. Josh told me you didn’t change anything on that regard but I seem to recall it was faster on small project before. The second compilation instead is obviously much faster now since it’s reusing object files.
I think the slowness of the first pass got introduced with the new partial compilation.

Doesn’t 5.5 also update the C# compiler or is that coming in 5.6?

It does - that has little to do with il2cpp build times, though.