Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Reasons for poorer performance with Unity 5 IL2CPP compared to Unity 4.6 with mono

Discussion in 'iOS and tvOS' started by PixelSquad, Jul 13, 2015.

  1. PixelSquad

    PixelSquad

    Joined:
    Sep 4, 2014
    Posts:
    114
    Hi guys

    I'm trying to upgrade our project from Unity 4.6 32-bit to the latest patch of Unity 5 using IL2CPP.

    I've tested it so far on the iPhone 5, and iPad Mini, and we have a very noticeable loss of performance (from 60 to 30 FPS in some scenarios).

    I'm wondering if anyone has experienced the same issue and if there's a checklist we should look at to guarantee the same (or better, as promised :)) performance with IL2CPP.

    All the best
     
  2. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Why dont you try 4.6.7 with IL2CPP and check performance.
    Upgrading a 4.6 project o Unity 5 is always going to cause performance loss from my experiance.
    Its not a small task.
    Cheers
     
  3. sfjohansson

    sfjohansson

    Joined:
    Mar 12, 2013
    Posts:
    368
    The problems I experienced....On the graphics side of things I believe there is change in the static batching if you got "larger" levels with game objects marked as static. I had also some serious slowdowns with the metal API in the beginning but later releases but looking at the devices you listed, iPhone 5 and first generation of iPad mini, they don't support metal so that should rule out the graphics API. I'm currently sticking with 4.6 for my game as I could not get the same performance on 5.

    (the metal issues got at least in my case sorted or at least improved to a point where they didn't matter around April)
     
  4. PixelSquad

    PixelSquad

    Joined:
    Sep 4, 2014
    Posts:
    114
    Thanks for writing guys. I've tested the latest patches of both Unity 4.6.7 and 5. I tried a particular scenario where with 4.6.3+mono I used to get 50-52 FPS now I get 24-27 fps with IL2CPP (with BOTH unity 4.6.7 and 5).

    We can't run instruments as it looks like OSX 10.10.4 no longer seems to support the iPhone 5 CPU. Delightful :)
     

    Attached Files:

  5. vqt123

    vqt123

    Joined:
    Apr 16, 2013
    Posts:
    23
    you change your xcode project scheme to release? it's set to debug by default, which had similar performance profile under mono, but not IL2CPP
     
  6. PixelSquad

    PixelSquad

    Joined:
    Sep 4, 2014
    Posts:
    114
    Hey vqt, many thanks for the post.

    You're right, the project was set to "debug" by default. It's better now, but still doesn't match mono, it's about 10% slower.
     
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @PixelSquad

    It may be useful to try Unity 5 with the Mono scripting backend as well. That may help determine if the performance problem is specific to IL2CPP or if it is something else in Unity 5.
     
  8. PixelSquad

    PixelSquad

    Joined:
    Sep 4, 2014
    Posts:
    114
    We're testing on 4.6.7, definitely still 10% slower with IL2CPP compared to mono.

    On Unity 5 there wasn't a difference on mono compared to 4.6.7 mono as far as I could tell.
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @PixelSquad

    Good, thanks for the information! I would definitely try 4.6.7p2 when it is available.