• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
Question by Frooxius · Oct 07, 2018 at 11:43 AM · androidbugperformanceil2cppmono

Drastically worse performance with IL2CPP compared to Mono on Android

Hello,

I'm having really strange issue with IL2CPP for Android (compiling for the Oculus Go), where I get really horrible performance compared to Mono.

With Mono my app runs fine 60 FPS. Takes about ~7 ms to update and ~2.5 ms to render the scene. I switch to IL2CPP (with Release configuration), no other changes, update goes to ~15-20 ms and rendering to about ~40-50 ms. I had no idea what could possibly be causing such a huge difference, especially for rendering.

Here's the profiler timeline with Mono: alt text Here's the exact same scene and code with IL2CPP: alt text

I'm using Unity 2018.3b4, using .NET 4.x Equivalent and .NET 4.x compatibility level. C++ Compiler is set to Release.

I have no idea what could be causing such a drastic performance degradation, does anyone have any ideas?

One thing I noticed is that it possibly might be some oddity in thread management, as some thread synchronization parts took significantly more time with IL2CPP than Mono, but I implemented some workarounds.

One thing I don't understand is the rendering taking significantly more time. There's almost nothing in the scene. There's a controller model, quad with texture, one simple UI dialog and nothing else. Mono takes 2.5 ms or so, yet with IL2CPP this jumps to over 40 ms for the same scene.

Any help would be appreciated, I'm not quite sure how to go about tackling this, other than trying more or less random things and see if that changes the behavior.

oculusgomono.png (479.7 kB)
oculusgoil2cpp.png (333.2 kB)
Comment

People who like this

0 Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ConstantineM · Nov 16, 2018 at 06:19 PM 0
Share

I stumbled upon (kinda) the same issue and I wanted to share what have I figured out so far:

I updated my current project that has been developed using unity 2018.2.12f1 to 2018.3b4 and i had the same issue with you (rendering took significantly more than before).

The main difference between my 2 builds (apart the unity version) is that IL2CPP of 2018.2.12f1 uses the Android NDK r13b while the IL2CPP of 2018.3b4 uses the Android NDK r16b but that's all i can say.

Somehow it makes IL2CPP builts slower (?)

1 Reply

· Add your reply
  • Sort: 
avatar image

Answer by jonagill_ag · Dec 06, 2018 at 06:59 AM

We are seeing even greater amounts of performance slowdown on PC builds. On Mono our game runs at 90 FPS, and on IL2CPP it runs at 3 FPS -- quite literally unplayable. We verified this on 2018.1.5 and 2018.2.18.

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

293 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Android Build with il2cpp failed: The specified executable is not a valid application for this OS platform. 1 Answer

5.2.1beta and p1 both crash at "vm/Class.cpp:1398" on Android il2cpp 0 Answers

IL2CPP random crash on android, please help me 0 Answers

Camera Doesn't Show Game In Build 0 Answers

Android Build crahes after submitting to play store 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges