Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Poor performance on Android regardless of scripting code.

Discussion in 'Project Tiny' started by reallyhexln, Apr 15, 2019.

  1. reallyhexln

    reallyhexln

    Joined:
    Jun 18, 2018
    Posts:
    69
    Hello for everyone.

    I'm trying to create a scene with ~50 RectTransform objects. I do not have any code except the code of Tiny systems.
    I instantiate a scene once when the game is started.

    I trying to open generated release version in Chrome desktop browser and I get stable 60 FPS.

    I trying to open the same version in Chrome Android browser and I get 8-10 FPS, even when the scene is completely loaded. When I trying to open this version in Firefox Android browser I get 4-5 FPS.

    Have you any idea why that might be? Maybe, there are some problems with build settings?

    I have made some investigation in Chrome Profiler.
    It returns the following summary for each frame:
    Duration: 154.31 ms
    FPS: 6
    CPU time: 7.88 ms
    GPU time: 137.91 ms


    I can't understand why there is so much time spend to GPU in each frame.

    UPD:

    Android Version: 9.0
    Device: Huawei Honor 8X
    Chrome: 73.0.3683.90
    Tiny: 0.14.3
     
    Last edited: Apr 15, 2019
  2. reallyhexln

    reallyhexln

    Joined:
    Jun 18, 2018
    Posts:
    69
    Hmm, I have tried to change Tiny renderer from WebGL to Canvas, and I get the expected 50-60 FPS on the Chrome.
    It was very unexpected for me, because I was sure, WebGL is much faster compared with Canvas.

    I've also tried to open TinyArms Demo in Chrome on the Android, and I got the same 10 FPS in game menu, so it's not a project specific bug.

    Guys, do you experience such issues?
    It seems like a bug in Tiny WebGL renderer, and it occurs when using UILayout and RectTransform components.
     
  3. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    214
    I had the same issue with my Cube Runner demo, switching to the older 'Canvas' over WebGL significantly improved Android performance.

    That was on a Samsung Galaxy S8+, although in fairness in my demo I was abusing the crap out of the Shape2D class and it was definitely the biggest hit in the profiler, but it looks like it's not isolated to that based on what you've written in your post.
     
    Last edited: Apr 17, 2019
    reallyhexln likes this.