Monday, June 1, 2015

iOS Memory Pressure Hell: Apple's 64-bit requirement+Unity's IL2CPP tech

Apple's 64-bit requirement combined with the newness of Unity's promising new IL2CPP technology (which you must use to meet Apple's 64-bit requirement) is costing us a serious amount of memory pain:


IL2CPP uses around 30-39MB more RAM for our 32-bit build. We've been struggling with memory on iOS for a while (as documented here). I honestly don't know where to find 30MB more RAM right now, which means our title on 512MB devices (like the iPhone 4s and iPad Mini) is now broken. Crap.

Some details:

Apple is requiring app updates to support 64-bit executables by June 1st. We've known and have been preparing to ship a 64-bit build of our first product for several months. The only way to create a 64-bit iOS build is to use Unity's new IL2CPP technology, which compiles C# code to C++:

The Future of Scripting in Unity
An Introduction to IL2CPP Internals
Unity 4.6.2 iOS 64-bit Support

The additional memory utilized by IL2CPP builds vs. the previous Mono-AOT approach is ~10MB for our code with an empty scene, and >30MB with everything running.

We've also tested the latest patch, Unity 4.6.5p4 (which is supposed to use less memory on iOS) with the same results.

3 comments:

  1. Hi Rich,

    Our primary focus points right now are memory usage reduction and app footprint reduction. For the memory usage reduction you seem to have a rather good case for us to optimize and test against. I know you already spoke with Lucas and Jonathan on twitter, but would also like to figure out a way to get permission for us to use your project for us to start using to profile and fix these issues against. Can you either ping me on @unitzeroone or mail me at {myfirstname} [at] unity3d {dot} com ?

    ReplyDelete
  2. Hi,
    Any updates for solving this issue. Did you find any solution

    ReplyDelete