Search Unity

Very poor performance on Android after upgrading to Unity 5

Discussion in 'Android' started by digitalMUTANT, Mar 3, 2015.

  1. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Usually, the QA department is there to make sure the issue can be reproduced before they forward it to a coder who is responsible to resolve the issue. This has nothing to do with ignoring.
     
  2. digitalMUTANT

    digitalMUTANT

    Joined:
    Mar 3, 2015
    Posts:
    15
    I will repeat once more, one of my previous posts :

    I have a scene with 3d objects(terrain, meshes) and a UI based on the Unity UI interface, that runned smoothly (70/80fps) with Unity 4.6 on a Android device (and 140fps on Editor).
    Once i've upgraded to Unity 5 I can only get 15 to 30 fps (and 50fps on Editor)... but if I disable the Canvas or all UI Components I can get back to 80fps... :s

    That's why the problem must be related to the 2D / UI / Canvas rendering...
     
    kriket and MrEsquire like this.
  3. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Sounds like a perfect performance regression. Did you submit a bug report?
     
  4. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Okay, so I have been watching this thread with some interest and decided it was time to actually do some real tests so here goes:

    1) Test scene with single sphere, UI Canvas and Text label, sphere has a Mobile/Bumped Diffuse
    UNITY 4 60FPS
    UNITY 5 60FPS

    2) Same scene Bumped Specular (non-mobile version)
    UNITY 4 59FPS
    UNITY 5 60FPS

    3) Using the Standard Shader
    UNITY 5 28FPS

    Based on these results I can see why Unity has an issue finding regressions. These are pretty much what I would have expected to see, the Standard Shader uses PBS and is far more complex in the calculations per pixel so I would expect this slow down when used across half the screen.

    Also just FYI this is running on a Astro Cyclone a real peice of rubbish when it comes to Android running a Mali-400 GPU.

    Now for my own project I did see slow performance using my own custom shaders which used to be surface shaders, so many of you may be finding slow down because of this, first change them all to Mobile/Bumped Diffuse, if you find your game runs much faster it's because of the new lighting in Surface Shaders which does a Cubemap sample in the GI Stage, I'd suggest adjusting the shaders to use the same lighting as the Mobile Shaders personally, or you could be brave and write your own optimised PBS, but thats a pretty mean feat, but I managed to get quite a workable version even on the old Mali.

    Good luck all, I think the issue is less a bug and more down to the shaders you are using are just not optimised for the Unity 5 pipeline!

    And do yourself a favour and actually post some real information and do some real tests yourself, if there any any bugs you will be doing us all a favour by isolating what causes it and reporting it to Unity, but just complaining with no Repo is doing none of use any help whatsoever.

    Thanks,

    Jon
     
    Griffo, Dantus and elias_t like this.
  5. antonov_3d

    antonov_3d

    Joined:
    Jan 21, 2015
    Posts:
    28

    sorry i just could not resist
    > to actually do some real tests
    >do some real
    yeah like the rest of people are just imagining
    > uses 3 built in shaders for tests
    > gets no problems (good for you)
    >"Also just FYI "

    >"Now for my own project I did see slow performance using my own custom shaders"
    and here we go, just LOL, you:
    1. use YOUR custom shaders(like lol, can you share the code? )
    2. "so many of you may be finding slow down because of this" (you kinda made a save throw here)
    3. "change them all to Mobile/Bumped Diffuse, if you find your game runs much faster it's because of the new lighting in Surface Shaders which does a Cubemap sample in the GI Stage,"
    nice assumption that everyone uses custom shaders. I for example have only ui in scene that doesnt use any custom shaders at all.
    4. "I'd suggest adjusting the shaders to use the same lighting as the Mobile Shaders personally," so basically leave it like it is - lagging
    5. "or you could be brave and write your own optimised PBS" for UI? interesting idea, one day, maybe

    6. "Good luck all, I think the issue is less a bug and more down to the shaders you are using are just not optimised for the Unity 5 pipeline!"
    you mean native shaders are not optimized?

    7."And do yourself a favour and actually post some real information and do some real tests yourself"
    this entitlement. i just dunno, i wanted to ignore but the entitlement just made me cringe.
    8. "if there any any bugs you will be doing us all a favour by isolating what causes it and reporting it to Unity,"
    thanks captain, everyone does that.
    9."but just complaining with no Repo is doing none of use any help whatsoever." just another assumption mixed with generalization.

    I mean, i do actually hope that your case will help someone but im pretty sure a lot of people will still suffer from performance drop. Could you upload shaders and scenes you used for testing? Which unity you used?
     
  6. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    A lot of people here are just writing, that the performance with Unity 5 is worse. Though, some started a new project and then made this kind of statement, even though they were using the new standard shader along with the procedural sky. Others made changes in the project, which makes it impossible to compare it with Unity 4.
    Many here are just complaining, which helps no one and even worse, it hides the good quality reports in the masses. It helps no one if people just write, yeah I have bad performance too. This thread is mostly a soup of things, but it is not really possible to nail actual issues down with the exception of the Unity UI issue.
    There a lots of people who pretend to have a clearly measurable performance loss. Why don't they submit their issues, such that Unity can analyze what is going on and do something about it? As far as I can see it, not one is saying that there are no issues, but the people who experience those have to submit bug reports, such that Unity can resolve them!
     
  7. Fuzzy

    Fuzzy

    Joined:
    Feb 11, 2011
    Posts:
    266
    I'd love to see this test without vsyncs 60fps limit and what the difference is after that, because the 60fps cap is (almost) easily reached with barely anything in the scene.
    Also! As in some cases it seemed to be important that you should not create the project in Unity 4 and upgrade it to Unity 5, but rather recreate the example in a new project in unity 5. Not sure if you did that.
     
  8. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    And this is what I mean, I can't see any posts with details from you other than the above that says "I for example have only ui in scene that doesnt use any custom shaders at all." so post the scene or a simple repo, I for one would be happy to take a look at it for you and see if there is anything I could help with, and where is your bug report reference? Unity have already asked for bug reports in this post, so if you have a repo post it, if there is a bug we all want to find it, but this thread currently is not helping the issue. Whilst I understand your frustration, don't have a go at me, I'm just a fellow developer offering to help you, you don't want help, I don't mind, but anyone that does, please post some useful info, I'm getting slow performance because of UI means nothing, what objects are you using? How many, how big...so many unknowns.

    It was without v-sync, the Cyclone is a real piece of crap, seriously getting more than 30 ftps is a miracle, it did go over the 60 fps but I averaged the values over a few of them. I'll do another repro where on 4.6 it runs at around say 45 fps and then post the results porting to 5, and recreating from scratch in 5 with the same scene.

    But I will say, my game runs faster in 5 (I'd say 25% ish), and it has a lot going on in it, but if you have any 3rd party shaders do the Mobile/Diffuse test to check if it's causing the slowdown, then check with them for Unity 5 versions especially if they are surface shaders.
     
  9. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Updated to have more going on in the scene:

    5 with spheres with Bumped Specular, 4 with Alpha Bumped Specular
    Unity 4 AVG:53
    Unity 5 AVG:29

    9 with Mobile/Bumped Specular (there is no mobile Alpha Bumped Specular)
    Unity 4 AVG:56
    Unity 5 AVG:53

    So the first set is performing much slower in Unity 5, this is because of the cubemap sampling in Unity 5 GI, the Mobile Shaders don't do the Cubemap reflection sampling so the results are much closer, a little slower in 5, but over 10 seconds average it could be background tasks, but I'm sure a small difference wouldn't be too much an issue, the half speed from Desktop shaders I can understand people seeing a huge slowdown here.

    Again, really going through the posts on here, there is not enough information to be able to see whats is causing peoples slowdowns, so please post some proper information.

    By the way, creating a scene from scratch VS upgrading gave the same results.
     
  10. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Jonny Roy, in the second in Unity5 test, have you disabled the standard unity5 skybox aswell? Because on my tests the skybox alone dropped the framerate a lot.
     
    Last edited: Jun 11, 2015
  11. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    I didn't add it to start with, I used a standard skybox with 6 images, not optimal for mobile, but something a lot of people might do, so I figured a good test.

    People are saying about poor performance compared to Unity 4, so I'm thinking it's most fair to compare them as like for like as possible!
     
  12. Haseeb_BSAA

    Haseeb_BSAA

    Joined:
    Aug 20, 2014
    Posts:
    316
    Hi guys , I am having a weird problem with Unity 5. I was developing a 3D Platformer game in Unity 4.6 and today when I upgraded to Unity 5 , my character movement is too slow and physics behavior is totally ruined. :(
    It seems like there is very small amount of gravity acting on the character , when I play the game , it takes like 15 seconds to reach the ground. Also jumping has gone so weird. I checked my scripts , also checked everything in the inspector , it's still the same. Now I can't even downgrade and start working on the same project. Please help me , anyone? :(
     
  13. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I do not think this has anything to do with FPS performance on Android.
    I suggest you make a new post, this thread is about Performance on Android on working games.
    Of course if your game was working fine on 4.6 then there is no need to upgrade it.
     
    Jonny-Roy and Haseeb_BSAA like this.
  14. Haseeb_BSAA

    Haseeb_BSAA

    Joined:
    Aug 20, 2014
    Posts:
    316
    I already posted a new thread about it. But don't you think Unity 5 is better than Unity 4.6? Just asking.
    My only purpose to upgrade to Unity 5 was to get some better features. I didn't know this would happen.
     
  15. EvilDingo

    EvilDingo

    Joined:
    May 7, 2011
    Posts:
    190
    Well, I waited until Unity 5.1 to upgrade because I'm used to getting very frustrated with big Unity updates. And my extremely simple scene (no sky, no lights, nothing) is getting 15fps on Android using mobile shaders. If I point the camera to the (empty) sky, the fps climbs. If I point it directly at geomtry, even a simple mesh less than 100 tris, the fps plummets.

    This is ridiculous and total waste of time. 5.1! That's months of fixes and still something like this!

    Back to Unity 4 for me. I'll look at Unity 5 again in another couple months.
     
    Haseeb_BSAA likes this.
  16. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Did you submit a bug report with your project?
     
  17. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    We'd need more info to go on here, you don't mention the device tested or what specific shaders, what texture compression, if the scene is truly so simple why not share and see if other people have the same issue or if you are missing something!
     
    larku likes this.
  18. Haseeb_BSAA

    Haseeb_BSAA

    Joined:
    Aug 20, 2014
    Posts:
    316
    I feel ya man!
     
  19. iivo_k

    iivo_k

    Joined:
    Jan 28, 2013
    Posts:
    314
    Yeah, doesn't affect frame rate but it's currently a huge problem for us. QA replied to my bug report that they verified it and sent it onwards, do you know if it can be expected to be solved soon?
     
    MrEsquire likes this.
  20. Driven

    Driven

    Joined:
    May 31, 2013
    Posts:
    77
    Same here: Resources.Load was working fine in Unity 4. In Unity 5 the game literally freezes during that call, LoadAsync doesn't help much it still needs insane amount of time. It is like a blocker for gamedevelopment right now. I hope it gets fixed asap!
     
  21. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    Resources.Load during runtime anyway is generally a bad idea, rather load your objects in the scene loading phase, then load them from the pool them as neccessary. Look up object pooling, loads of example scripts.
     
  22. iivo_k

    iivo_k

    Joined:
    Jan 28, 2013
    Posts:
    314
    Scene loading phase is runtime too, and the problem is that it now takes ages to load prefabs with Resources.Load. Pooling won't help here.
     
  23. PerfectlyInsane

    PerfectlyInsane

    Joined:
    Aug 9, 2013
    Posts:
    74
    So I guess even at 5.11 its back to the drawingboard. There was no mention of any performance fixes for android in the release notes.
     
    MrEsquire likes this.
  24. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    There is no mention of a issue being found yet, if they mention and explain the issue present then I be happy to know that they least located the culprits, I assume there maybe some internal discussions happening now.
    Also the Android permission issues are just as important. I just hope for Unity 5.2 there is a real table talk about how they will solve all this in one big push instead of the little bits and bobs each patch release. Currently my understanding is teams are being pushed to develop new and promised features for Unity 5.2 etc and simply no time to correct all this...
     
  25. CyberTurboPlays

    CyberTurboPlays

    Joined:
    Nov 7, 2014
    Posts:
    65
    the big picture is U5 is definitely dragging on android performance, that is something for sure.

    since there are so many ppl experienced it this way(including mysel : my cur proj which started straight from U5 is sufferring bad performance on android), it really doesnt matter what test environment we really used for testing, or what kind of game we are making, its a problem from the engine itsel in general.

    and that is something Unity Tech need to address right away, NOT US. Dont just watch this thread and wait for us to find out what cause the bad performance on android, afterall we didnt make and own the engine

    imagine this as in the game description in store:
    "brand new game powered by the brand new POWERFUL unity engine 5, play the game in maximum 45 fps speed on andorid to experience the fun(hey. it will be way better than watching a movie). available on all major app stores"

    what would the gamers think?
     
    Friction and MrEsquire like this.
  26. O_and_N

    O_and_N

    Joined:
    Oct 17, 2014
    Posts:
    50
    Yeah,what happened to the so called "workhorse" Riccitiello was promoting.(not wanting to start anything here and is not my intention)But i have a feeling that epic will fix first their performance on android,some people have started porting things from the unity store to theirs and what will happen at the end?I surely hope this 1.8 years life cycle is not a exuse and unity 6 being made in the background(just thinking out loud).
     
  27. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    It certainly matters what the test environment and what kind of game or better what kind of content you are making.
     
  28. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    I hate to say it, but a few people posting on here about performance with very little specifics (so they could just be using new heavy processing features like standard shader, realtime GI or new Skybox) is nothing compared to the millions of users, I see less that 50 names in this thread, it's not even 0.0001% of the users, it suggests the performance is quite specific and quite difficult to trace, I'm not saying it doesn't exist, but it won't go away if no one can recreate it, and no one can recreate it without details, there's people here saying with a simple scene, post the scene, report a bug!!

    Why are people all too ready to complain on here, yet no one really seems to want to get the issue sorted out...so confussing.
     
    larku likes this.
  29. PerfectlyInsane

    PerfectlyInsane

    Joined:
    Aug 9, 2013
    Posts:
    74
    Maybe one of these is on by default even though i have them unchecked.

    I cant even try no more.. With 5.02 apks would actually launch and I get 12 fps. Now the game simply crashes with no error messages.

    In the editor after an import, I have multiple instances of the same object. Some of them, appear light white whilst other appears normal.

    And gravity needs to be changed from 9.81 to 40 to get it back to normal.

    I don't have the heart to learn the new Unity networking seeing the current state of things, seeing there is no way i can migrate to 5
     
    Last edited: Jun 22, 2015
  30. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Try posting your scene or bug reporting it, it could be something you are doing wrong, or a bug, but all the above says is you have an issue but haven't a clue what it is or what you have in the scene, have you checked the shaders used on each of those objects?
     
  31. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    At least the gravity part sounds like a user error to me. But I could certainly be wrong.
     
    Jonny-Roy likes this.
  32. Haseeb_BSAA

    Haseeb_BSAA

    Joined:
    Aug 20, 2014
    Posts:
    316
    Actually I fixed the Gravity problem by Unchecking "Apply Root Motion" in the animator component. (Rigidbody)
     
  33. kuato4

    kuato4

    Joined:
    May 14, 2015
    Posts:
    3
    Same here:
    5.0.1f1 / ~ 40 fps
    5.1.1f1 / ~ 16 fps
    Using Mobile/Diffuse shaders.
     
  34. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I know that I ask that many times in this thread, but did you submit a bug report. And if so, what is the case number?
     
    Jonny-Roy likes this.
  35. kuato4

    kuato4

    Joined:
    May 14, 2015
    Posts:
    3
    Sorry, didn't report it, maybe later.
     
  36. andiB

    andiB

    Joined:
    Jan 13, 2013
    Posts:
    26
    Same here. I created a bug report for my issue.
    http://forum.unity3d.com/threads/framerate-drop-since-5-1.333390/
     
    MrEsquire likes this.
  37. RMGK

    RMGK

    Joined:
    Sep 30, 2011
    Posts:
    75
    For us, Everyplay killed our perf. It does not show up in the profiler so its a hard one to find.
     
  38. RMGK

    RMGK

    Joined:
    Sep 30, 2011
    Posts:
    75
    Heads up, in Unity 5.1.x they hide the force Open GL2 under "Automatic Graphics API". Un-tick that and remove Open GL 3 from that list so only OpenGL 2 is left in the list. That helped me out with my Amazon Builds.
     
    CyberScopes and Sunwest3d like this.
  39. squadron

    squadron

    Joined:
    Jun 27, 2015
    Posts:
    2
    i'm trying to make a android game but this scares the hell out of me. I hv to say that U5 is turning into blender. a software i couldnt use properly. for me that is.:eek:
     
    MrEsquire likes this.
  40. Nerosam

    Nerosam

    Joined:
    Jul 23, 2013
    Posts:
    40
    Considering how many people are probably screwed by unity 5's performance on android, has anyone thought of a good way to convert scenes to unity 4.6? Im thinking of using some sort of serialization technique to write a scenes objects to file and load that into a new scene in unity 4.6. But that could have reference issues...
     
  41. CyberTurboPlays

    CyberTurboPlays

    Joined:
    Nov 7, 2014
    Posts:
    65
    its funny when i got up this morining, i was thinking about the exact same thing. there you hav vote.

    can we ask the unity tech dep to get something like that working for us?
     
  42. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Can someone try and do a comparison with 5.2beta1 if issues still exist
     
  43. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    I'm eager too! Once that crash goes away I reported, I'll post a comparison, though mine does run pretty good already so it might not be such a good test as others on here!
     
  44. Lizzard4000

    Lizzard4000

    Joined:
    Mar 3, 2010
    Posts:
    101
    Not sure if it's related...
    I have tested only on my iphone4, but if i set the rendering path to "Legacy Vertex Lit" instead of "Forward" i get constant 60 fps (3-4k tris scene, very optimized + a lot of runtime batched drawcalls).
    If i set it to "Forward" i cant get over 30 fps!
     
  45. scrlklk

    scrlklk

    Joined:
    Dec 23, 2013
    Posts:
    8
    My problem is the game run very smooth on the lower end device(like s2, note2), but incredible lag on some high end device(s4, s5, tab 10).
    I have tried every possible solution in this thread, but no luck..
    My game has only ~15 drawcalls with mobile/unlit shader, all models are low poly, no light no shadow, scene with only one script which translate and rotate the car in update with Time.deltatime

    The problem really drive me crazy for weeks.. I was developing in my note 2 which runs perfectly and I was ready to publish to playstore before I tested on my friends high end device...

    I am using Unity5.1.1, also tested with the newest patch 5.1.1p4 but no luck
     
    Last edited: Jul 12, 2015
    MrEsquire likes this.
  46. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    What's the case number of your bug report?
     
  47. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I dont think iOS performance is a issue..
     
  48. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Use the Profiler!! find the issue, fix the issue.
     
  49. truecrisis

    truecrisis

    Joined:
    Feb 17, 2015
    Posts:
    8
    It's funny that with as many "devs" as there are here, they can't seem to understand that without exact reproduction steps / proof, that nothing will get fixed.

    You are wasting your time writing and complaining here or anywhere, if you don't provide anything useful to the unity team. They aren't gods that can wave a wand, they need concrete examples and reproductions steps.

    Why does this even need to be said.
    You are programmers!
     
    mh114, milox777, Jonny-Roy and 3 others like this.
  50. alahti

    alahti

    Joined:
    Feb 7, 2013
    Posts:
    4
    Very strange, have enabled "vsync every second" in development mode, built it and then got 60+ fps, disabled after that and still got 60+ fps.
    Maybe helps somebody. My game run now same as in iphone build.
     
    Last edited: Jul 13, 2015