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:
Here’s the exact same scene and code with IL2CPP:
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.