Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Unity 2018.2.14f1 Static Batching performance issues on Mobile.

Discussion in 'General Graphics' started by VCFY, Nov 4, 2018.

  1. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
    Hello, after doing some tests on android on Unity 2018.2.14f1, i noticed that static batching does have much lower performance gain compared to Unity 2017.3.0p1, which seems to be working as it should.

    The test scene consists of 1000 spheres with Mobile/Diffuse shader. In 2018.2.14f1 i only get a 7 fps increase, whereas in 2017.3.0p1 the increase is around 20 fps.

    Here are screenshots:

    Unity 2017.3.0p1 - Static Batching Turned off


    Unity 2017.3.0p1 - Static Batching Turned on


    Unity 2018.2.14f1 - Static Batching Turned off


    Unity 2018.2.14f1 - Static Batching Turned on
     
    Last edited: Nov 5, 2018
    hungrybelome likes this.
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,836
    Hi!
    When measuring performance, it's better to use frame time instead of fps, since it's linear.
    May I ask, how did you measure it?
     
  3. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
    Hi, i've just updated the screenshots, there was an error with the links, i did not use frame time but the screenshots pretty much explain it all.
     
  4. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,836
    No, they don't :)
    How long did you wait before taking each of the screenshots? Did you let your device to cool down between runs? It might take around 5 minutes.
     
  5. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
    Each screenshot was taken few seconds after launching the app. I actually waited a few minutes before each test to ensure is not the throttling issue, plus i ran each test quite a lot of times to make sure the results are consistent.
     
    Last edited: Nov 6, 2018
  6. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,836
    That's great!

    What are your VSync settings?
     
  7. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
    It's set Every V Blank. All other setting are identical between the projects as well. I would also like to clarify that the number of the spheres was 2000 instead of the abovementioned 1000.
     
    Last edited: Nov 6, 2018
  8. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,836
    Do you have target frame rate set?
     
  9. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
    I've just done a similar test on Xperia Z2, and the static batching performance seems to be almost if not identical. I'm not sure but this could very well be a device or GPU/CPU specific issue (Galaxy S8 Exynos).
     
  10. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
    No.
     
  11. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,836
    Please report a bug then :)
     
  12. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
    4 days ago I've submitted a bug report (Case 1098752), and for some reason it has not appeared on the issue tracker yet.
    I've also done a similar test on iPhone X, and I believe it has the same batching issues.
     
    Last edited: Nov 11, 2018
  13. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
    BUMP!
     
  14. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,982
    Have you gotten a reply that they are able to reproduce the issue?

    QA may be swamped with bugs these days, they are kinda slow to reply lately (it used to be 1-2 days).
     
  15. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
    Nope, I have not, neither on the FogBugz website nor by email.
    it's been over 15 days since it was submitted and the issue still persists.
     
  16. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
    I've just received a message from Unity saying that they've been able to reproduce the bug and have sent it for resolution with their developers. :)
     
    hungrybelome and AcidArrow like this.
  17. VCFY

    VCFY

    Joined:
    Feb 7, 2015
    Posts:
    24
  18. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    If you are batching a ton of small things or a lot of the same things, then you may actually find performance to be a lot higher just merging them and not using static batching, in reasonably sized cells. I found significant gains in the past like this for cpu limited devices.

    It's because regardless of if it's batched or not, Unity will still be required to handle the memory overhead, processing and of course culling for every individual item in that batch. This isn't cheap under a lot of scenarios.

    While this is unrelated to your bug, it may still be worth looking into.