Search Unity

Horrible framerate in landscape mode on Lumia 830

Discussion in 'Windows' started by johandanforth, Nov 20, 2015.

  1. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,728
    So updating:

    1) *Some* crashes were One Signal's fault, we removed it from the Windows Phone builds for the time being.

    2) The maxQueuedFrames workaround is doing nothing for us. Our 925 running Windows 10 is still running as slow as ever with Master build and on landscape (portrait is fine).

    3) There are still a lot of crashes, but also, bizarre things in the failure logs (for example, some logs refer to device type Desktop and package version : 1.0.0.0. Our game is mobile only and I don't think we ever had a package version 1.0.0.0, even when we first launched)

    4) The trial code seems to stop working... sometimes... Sometimes it works. Sometimes it just won't work AT ALL. Not sure if it's Unity's fault, or the Windows Store or whatever, but we had no problems when it was a Windows Phone 8 game.

    All the above don't make me feel *that* great that we are stuck in 4.7...

    So overall, not so great...
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    I finished looking at one of the issues (case 747492), which resulted in improved performance across the board for all Direct3D platforms in case you are GPU bound. Once the fix lands to 5.4 beta, I plan to backport it to 5.3.

    I have still a few bug reports left to investigate, there might be further performance issues that might be fixed.
     
    Gametyme, Anisoropos and MrEsquire like this.
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    @johandanforth: I looked at your project. In that project, you have antialiasing enabled, which basically destroys the performance on this phone. However, even with Antialiasing disabled, framerate is only around 40 fps. This is due to the procedural skybox, which seems to be too sophisticated for this device. Disabling the sun on the skybox inceases the frame rate a little bit, but I'd advice to not use procedural skybox on phones. Their GPUs are simply too weak.
     
    Anisoropos likes this.
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    And the fix I mentioned was just released with patch 5.3.1p4.
     
  5. RedDuck

    RedDuck

    Joined:
    Aug 14, 2014
    Posts:
    15
    Hello,

    I Have same problem with a lumia 650 on W10 mobile.
    A simple game with just 1 cube run on 60fps in portrait and only 40fps in landscape.
    I think, even in portrait, performance in W10 mobile is very bad, compared to android device. :-(

    I have lastest unity 5.3.3p2
    Do you confirm that this patch contains your fix ?
    Is it some other fix in next release that fix performance issues ? and when it is release ?

    Thanks for your help,
    Sébastien
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    There are no more specific Windows perf fixes coming. 5.3.3p2 contains my fix.

    What comparable Android device are you testing on? Did you make sure the quality settings match? Do you have antialiasing or anisotropic filtering enabled in your quality settings? What's in the background of the cube?

    We're not aware of any cases where Windows performance is noticeably better than equivalent Android performance. If you find such a case, please tell us.
     
  7. RedDuck

    RedDuck

    Joined:
    Aug 14, 2014
    Posts:
    15
    OK. I'm sorry, compare to Android device is not a good thing.

    For my test project, quality was by default on max. So if i set as simple, it's ok now, 60fps.

    But i have an existing project, a 2d game. Startup screen is basic. Fixed background + UI.
    If i export to Windows Phone 8.1 and deploy on a lumia 625, it's OK, 60fps.
    If i export to Universal Windows 10 and deploy on my new lumia 650 device, fps is at 30FPS.

    It's like a limit of fps to 30 is set... Is it a parameter on the project settings for max fps ?
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    There shouldn't be a framerate limit unless you used Application.targetFrameRate.

    Did you try using the profiler to see what's taking time? Lumia 650 has slower GPU than Lumia 625, yet has a higher resolution screen. Did you try reducing rendering resolution with Screen.SetResolution?
     
  9. RedDuck

    RedDuck

    Joined:
    Aug 14, 2014
    Posts:
    15
    I try to put only 1 static image. I obtain 30fps in native resolution.
    When i switch to 800*480 resolution, i obtain 50fps. But for only one static image, it's not terrible.

    I will try to make a little game sample that i will upload.
    Thanks.
     
  10. RedDuck

    RedDuck

    Joined:
    Aug 14, 2014
    Posts:
    15
    Hello Zilys,

    I made a little project you can find here : http://t2sdev.free.fr/unitytestwin/TestWin.zip
    Only 1 image add to the scene and it's run at only 35FPS on my lumia 650 in landscape mode

    Let me know if you need some additionnals information.
    Thanks you,Sébastien.

    Here is the profiler :



     
  11. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    What framerate do you get on Lumia 650 if you build it as Windows Phone 8.1 app?
     
  12. Freeubi

    Freeubi

    Joined:
    May 30, 2014
    Posts:
    21
    I have a l820, and the framerate is horrible with the final or patch release.
    But its working fine with the beta 8 version - you should try that :)
     
  13. RedDuck

    RedDuck

    Joined:
    Aug 14, 2014
    Posts:
    15
    @Tautvydas Zilys : It's the same (arround 35fps) with a phone 8.1 app on the 650

    @Freeubi : Thanks for the tip. But I use free version of unity and doesn't have access to beta release
     
  14. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    I don't have a Lumia 650 at the office, but I tried it on Lumia 830 (which has very similar hardware) and got solid 60 fps on both portrait and landscape. So I am slightly confused by this. Is the framerate different on portrait orientation? Does changing quality settings to fastest have any effect?
     
  15. RedDuck

    RedDuck

    Joined:
    Aug 14, 2014
    Posts:
    15
    Yes, in portrait mode, I hit the 60FPS.

    One strange thing, when I click on the right border to make windows bar appears, FPS will hit 60FPS
    If I click back on the screen, windows bar disappears and FPS is back to 35FPS ...

    And quality settings dont have any impact.

    See profiler below :

     
    MrEsquire likes this.
  16. Freeubi

    Freeubi

    Joined:
    May 30, 2014
    Posts:
    21
  17. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    To confuse things,

    RedDuck is running free version 5.3.3p2.
    Developer: There are no more specific Windows perf fixes coming. 5.3.3p2 contains my fix.

    Freeubi you saying you are running 5.4 BETA 8/9 version of Unity.
    So I think there is a separate issue present here.

    5.4 will go live soon and we must make sure there is no performance issues!
     
  18. Freeubi

    Freeubi

    Joined:
    May 30, 2014
    Posts:
    21
    No, i just saying that with 5.3.x i have performance problems,
    and with 5.4 Beta i dont have -> there is a chance that it will be fixed with the next version.
     
    MrEsquire likes this.
  19. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    The reason Freeubi's game runs faster is due to the fact that we made "Object.name" property retrieval ~10 times faster in Unity 5.4, and he was calling it excessively in his Update() functions. This particular change will not help RedDuck.

    Either way, we'll dig into why perf is so bad on Lumia 650 - it's a brand new phone that came out a few weeks ago. It's weird that the performance on it is worse than equivalent spec'd phones, especially on such a simple scene. I don't yet know what's causing it.
     
    MrEsquire likes this.
  20. RedDuck

    RedDuck

    Joined:
    Aug 14, 2014
    Posts:
    15
    I made a try with the beta of 5.4, but it's the same result.
     
  21. kB11

    kB11

    Joined:
    Jan 24, 2016
    Posts:
    89
    Our game runs noticeably worse on Windows compared to Android on similar hardware.
    I am testing on an LG G3 (Android 5.0) and a Lumia 950. Both devices have the same screen resolution (QHD) and the 950 should have a slightly more powerful SOC (Snapdragon 808 vs Snapdragon 801).

    But the performance on the 950 is about half of what it is on the G3 in certain circumstances.

    I have attached a very simple project that replicates this issue. It contains a scene with a transparent plane using the Standard Shader in front of two circle sprites and behind 4 dynamic lights. I know this is literally the opposite of what one should do to achieve good performance on mobile, but the actual game actually runs at nearly constant 60fps on the G3 and it looks pretty ;)

    In the test scene I get about 12fps in landscape mode on the 950, and 36fps in landscape mode on the G3.
    So, the G3 is 3 times as fast.

    PS: That project also showcases the extremely long startup times on Windows, btw. Any news on that?
     

    Attached Files:

    Last edited: Mar 11, 2016
  22. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    @kB11 Could you file a bug report and tell us the case number so it does not get lost?

    I suppose the actual picture on both phones is the same?
     
  23. kB11

    kB11

    Joined:
    Jan 24, 2016
    Posts:
    89
    I filed a bug report. Case 778993.

    Both phones show exactly the same, as the camera cannot be moved in this example. I should probably also add that I did deploy the build using Master configuration.
     
  24. RedDuck

    RedDuck

    Joined:
    Aug 14, 2014
    Posts:
    15
    Hello,

    Have you somme update on the W10 mobile performance issue ?
    Is your team working on the issue ?

    Thanks,
     
  25. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Anyone retested on 5.3.4 final and 5.4 Beta 10?
     
  26. RedDuck

    RedDuck

    Joined:
    Aug 14, 2014
    Posts:
    15
    hello,
    with the 5.3.4 final, same problem.
    I have not tested with the lastest beta. I will test it tonight.
     
    MrEsquire likes this.
  27. RedDuck

    RedDuck

    Joined:
    Aug 14, 2014
    Posts:
    15
    I just tested with lastest beta, and the problem still the same.
    Performance are just not acceptable for lumia 650 device ...

    Hope Unity team are working on this problem.
     
  28. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    I've ordered Lumia 650 to my office since I couldn't reproduce it on any other phone. Investigation will continue once I have it. Sorry for the delay - I was at GDC last week.
     
  29. RedDuck

    RedDuck

    Joined:
    Aug 14, 2014
    Posts:
    15
    Thanks. It's a good news :)
     
  30. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    Hi,

    I've also got framerate issues with Windows Phone 8.1 build on Unity 5.3.4f1.

    The device I'm using is Lumia 735.

    I made an empty scene just with a FPS counter and after building it to the device in VS 2015 Release mode, it gives me a count of 40 fps. This was after I've tested a build with a proper project and it giving me 10 fps max. Granted it is a bit heavy but in iOS and Android it runs fine.

    I'm going to try and deploy it on the store regardless and test it while downloading directly from the store.
     
  31. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Submitting to the store won't increase your frame rate.

    Did you double check that quality settings are not set to highest quality with MSAA and anisotropic filtering? That kills performance on mobile usually.

    Are you CPU or GPU bound?

    Btw, 40 FPS is kind of what we expect for our skybox on such a phone using highest quality settings. The skybox shader at best quality is very expensive. Reducing quality settings will make it several times faster.
     
  32. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    It's on fastest quality setting. I don't understand the CPU/GPU question. I deploy it with the ARM option. I'm only talking about a scene with a new camera and a FPS counter script. Max I get is 40 fps.
     
  33. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    What does the profiler show you? You're not running using debug configuration, are you?
     
  34. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    Profiler is attached. I'm not using debug configuration. This happens with all configurations (release, master, debug). It seems its capped at 40 fps.
     

    Attached Files:

  35. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    It looks like it's waiting for the GPU to finish drawing every frame: you're GPU bound.

    You could use VS2015 graphics analysis tool to see where the GPU is spending the time. You can do that by pressing Debug -> Graphics -> Start Diagnostics, then wait for the game to load until you see bad performance and press Capture Frame. Once frame is captured, stop debugging, press on the frame to view more info. In the main window, there will be Frame Analysis tab, in which there's one button: "Run Analysis for frame n.". Press that. It will take a few minutes, and produce a nice report telling you exactly how much time the GPU spent processing each draw call during that frame.
     
  36. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37

    Attached Files:

  37. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Don't ever look at perf on debug. It's useless metric. Debug config has slow perf intentionally.

    I find a hard time making out details from the doc you attached - the view should be much clearer in VS analysis window. How many milliseconds does it say that the frame took to render?
     
  38. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    1.5 ms....I think.... In the baseline details, the Time value is 1.5 ms. Attached a screenshot of the analysis. How can I improve on the performance of an empty scene? Is it something to do with the build options that I can change? They are mostly at default...
     

    Attached Files:

  39. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Something is terribly wrong. Unity's profiler is saying that it's waiting for the GPU to present for 16 ms, while the GPU takes 1.5 ms to draw the frame. Is Application.targetFrameRate set to anything? Could you try enabling GPU profiler in Unity and show a screenshot of that?

    upload_2016-3-24_18-49-12.png
     
  40. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    Didn't mess with targetFrameRate. It's at -1. Screen attached.
     

    Attached Files:

  41. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    So, nothing can be done for me? Should I get a new device? A different version of Unity?
     
  42. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Sorry, I missed your post. What OS version is your phone running?
     
  43. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    Windows Phone 8.1.
     
  44. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Can you submit a bug report with a Unity project with which you experience these problems attached so we could investigate it? In it, please also describe phone model, exact OS version (can be found in Settings -> About) and any other info you that you think may be relevant.
     
  45. DPoli

    DPoli

    Joined:
    May 20, 2013
    Posts:
    37
    Done. Case #783452
     
  46. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    The project you submitted had 4xMSAA enabled. Disabling it in quality settings made it run at 60 fps stable.

    As I said before, MSAA just destroys performance on phones. You really don't want to have it enabled.

    I'll investigate why it causes issues even in such an empty scene as yours, but I can't promise that we'll be able to fix it.
     
    MrEsquire likes this.