Search Unity

Very Slow Performance On Lumia 520

Discussion in 'Windows' started by Nidre, Sep 19, 2013.

  1. Nidre

    Nidre

    Joined:
    Dec 12, 2012
    Posts:
    22
    Hello,

    I am trying to port our upcoming Android game to Windows Phone specifically Lumia 520 but im getting incredibly slow performance.

    Somehow the performance is better -but still a lot slower than expected- if i launch the application from Visual Studio as "Master" but by pressing F5 rather than launching from the Phone itself by tapping.

    What i'm trying to is find the cause of that.Since i can not profile GPU it is very hard to find out if the issue is graphics related.I have tried to shrink textures to the half of their original size.Tried to disable UI completely(EZGUI) but had almost no performance gains.

    Also when i profile the game from Unity on Lumia 520 i observe a lot of Overhade (%60+) all the time.This seems like the reason of the slow performance.

    Btw i only use DXT1,DXT5,RGBA16 and RGBA32 textures.Mostly DXT1 and DXT5.

    Any help or guidance is appreciated.

    To see how it is performing on Android you can apply for beta from the following link : http://bit.ly/StCappformWT

    Update 1
    I have tried to disable Audio and GUI(EZGUI) completely to if the problem was related to those with no luck.

    Update 2
    Also i should add that game performs quite ok even on low end Android devices.I believe there is some platform/device related difference/issue that i'm missing and causing this problem.
     
    Last edited: Sep 20, 2013
  2. yurilin1

    yurilin1

    Joined:
    May 22, 2013
    Posts:
    102
    Hey,I have the same device.
    What kind of games are you working with?A 3d game?
    I test some apps on store seems no lags.
    And I tried a 2d game which implemented from ios.Works nothing different

    Maybe you should use fixedupdate to replace the update to force the physical performs independent of the device
     
  3. Nidre

    Nidre

    Joined:
    Dec 12, 2012
    Posts:
    22
    It's a 3d game depending on physics primarily.But I'm having those performance issues as soon as the menu loads which has close to 0 physics calculations.

    Well all physics related code are already in fixedUpdate.Also the performance is quite ok on even low-end android devices.So i believe that ,this is not an optimization related issue.
     
  4. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    Its possible there could be a shader bug and only WP8 is getting effected by it being compiled wrong in Unity.
    I would try to disable things you think might be making it run slow to narrow it down.
     
  5. Nidre

    Nidre

    Joined:
    Dec 12, 2012
    Posts:
    22
    I should have updated the topic,

    I have some findings,I have tried to disable all sounds and GUI with no luck.Tried to slow down physics calculations no luck.What helped was lowering the number of objects that i was pre-loading to pool.I think Lumia 520 heap memory is smaller than most android devices because i didn't had this problem before on Android devices.

    Now i'm trying to find ways to reduce my heap memory consumption to see if that was the case.
     
  6. nikescar

    nikescar

    Joined:
    Nov 16, 2011
    Posts:
    165
    Have you tried unchecking "Development Build" in Unity Build Settings? I haven't got around to deploying to Windows Phone (I will tonight on a Lumia 520) but on a low powered laptop our game loaded very slowly and had pretty crummy performance when it was a development build. After unchecking that it ran very nicely.
     
  7. Nidre

    Nidre

    Joined:
    Dec 12, 2012
    Posts:
    22
    I have tried that and had no chance.I believe the problem lies under memory consumption i got better performance after optimizing memory usage further.
     
  8. nikescar

    nikescar

    Joined:
    Nov 16, 2011
    Posts:
    165
    What is your current memory footprint?
     
  9. Nidre

    Nidre

    Joined:
    Dec 12, 2012
    Posts:
    22
    Currently the game uses approx 10-15mb of heap memory after the preloading.Also the game uses around 80 to 100mb of stack memory on android.Unfortunately i have no idea how to see the consumption on WP8 without connecting the profiler.Bu as far as i know Lumia is capable of letting me use as much as 180mb of memory without trouble.So i think stack memory shouldn't be the case.

    So believe the problem is either in heap memory or the number of objects.

    Profiler shows i have 3093 game objects in scene but most of them are waiting in pool disabled.So i think it shouldn't make a performance hit but those objects might be filling up my heap memory therefore they might be resulting in WP8 hiccups.

    The main problem is WP8 debugging tools are not as advanced as android and i can not really pin point the problem.I am just trying to fix possible problems to see if it helps or not. :/
     
    Last edited: Sep 24, 2013
  10. Nidre

    Nidre

    Joined:
    Dec 12, 2012
    Posts:
    22
    I have also tried to reduce the screen resolution to see if the problem was fillrate.It made little to none difference.
     
  11. elanguido

    elanguido

    Joined:
    Nov 24, 2012
    Posts:
    5
    I am having the same issue.

    Android Samsung Galaxy Ace 2, with dual core 800 MHz, gpu mali-400 and 768 mb ram: 30/50 fps.

    WP8 Samsung Ativ S, with dual-core Krait 1.5GHz, gpu Adreno 225 and 1Gb ram: 15/30 fps.

    guidance is needed for WP8 optimization.
     
  12. Phil-AV

    Phil-AV

    Joined:
    Jul 9, 2012
    Posts:
    57
    Ok guys, after hearing about low performance on Lumia 520 devices, we bought one to test our games on. I can confirm that one of our games (I'm talking a game that is targeted at low-end devices) runs approximately the same speed (40-60fps) as an iPhone 3GS / Motorola Milestone (600 MHz Cortex-A8 ). We'll probably end up locking the device to 30fps for these low-end devices, but overall I'm fairly happy with the performance for a £100 phone. It's occasionally a bit jerky but far less than most android devices (which seem to just screw you over every other second).

    To put this into perspective though, our scene's running around 15-20k polys with as few draw calls as possible. Also using a custom shader for 99% of the geometry which is based off the Mobile/Unlit shader. Very little transparency except where menus are visible. I've also super-micro-optimised the S*** out of the game over about a year, shaving off nanosecond by nanosecond where possible. Most textures are using DXT5 compression, with no compression on meshes.
     
  13. cpasjuste

    cpasjuste

    Joined:
    Apr 2, 2012
    Posts:
    154
    I also think there's something weird somewhere. I'm developing a game which run at 60 fps on my nexus 4 (of course it does!) and 60 fps on the nexus 7 (tegra 3).

    On a Windows 8 RT (surface) tablet which also run with a tegra 3 i get around 30~40 fps with the same setup :/
     
  14. SpookyFishGames

    SpookyFishGames

    Joined:
    Jan 28, 2013
    Posts:
    27
    I'm seeing the same sort of performance differences when using the new Windows option in Unity 4.2.1.

    My game works fine on all my other devices/platforms (iPod 4th Gen, iPad Mini, iPad 4 Retina, Samsung Nexus Nexus 7, and a few others that friends have tested on as well) but as soon as I do a build for Windows RT, and run it on my SurfaceRT it takes 2-3 times longer to load (on that horrible grey loading screen, that I can't work out how to change) than all the others and runs, at best, half the frame rate of the other platforms/devices. I've not managed to try on WP8 yet but, based on what others are saying, I guess the issue will be the same there as well.

    I did manage to increase the performance by changing the project settings to export a D3D11 c++ project, rather than the c# default, but the result was still performing nowhere near as well as on the other platforms.

    I guess there is still some serious optimisation work to be done by the Unity guys for the Win8/WP8 platforms. I think I'm going to delay the Windows Store release of our title, until the windows stuff is a bit more mature. It's not like I'll be missing out on a huge market, especially with RT! :)
     
  15. m_danish_s

    m_danish_s

    Joined:
    Sep 2, 2014
    Posts:
    13
    I was having the same problem, while developing the game, so for future references if any one is developing a game on low end devices, try to change the build mode from Debug to Release. This solved my problem.
     
  16. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    You actually set it to "Master" for release builds.
     
    m_danish_s likes this.
  17. vladrybak

    vladrybak

    Joined:
    Aug 30, 2013
    Posts:
    108
    In my project i figured that windows platform painfully react on changing objects scale. If you change scale you should do this for all 3 coordinates together. If you change x =0.5 y=0.5 z=1 the perfomance fall down drammatically
     
  18. gn.gametorque

    gn.gametorque

    Joined:
    Feb 13, 2015
    Posts:
    26
    I had the same problem, when I deployed on my Windows Phone 8.1, the Animations were jerky in debug mode. But when I deployed same project in Release mode it worked perfect with smooth animation.
     
  19. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Never use Debug Mode..
     
    gn.gametorque likes this.