Search Unity

Question Bad Performace

Discussion in 'Entity Component System' started by JediNizar, Jun 21, 2021.

  1. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    Hi,
    First I hope I'm in the right sub forum, but as it's related to DOTS....
    I don't know what I'm doing wrong or what I need to change,, but I have horrible performance.
    My project Unity 2020.3.11f1, HDRP, HRV2, Occlusion is enabled and working, GPU instancing is enabled, some mashes are combined, LOD Groups are set.
    All my entities are static, I even tried to add static optimize Entity to see if there is any performance change.
    Also, all my Entities are gameobjects converted to Entity through Subscenes?
    Any help suggestion what to do is appreciated.


    p3.png p4.png p2.png p1.png
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Im seeing 42M verts/tris that seems like a lot for what's on screen.
     
    Nyanpas likes this.
  3. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    ok, here is an update this should only show what is on screen verts/tris
    p5.png
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    Use LODs
    It looks like you have not enabled burst.
    Physics is taking awful lot somehow.
     
  5. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    but it is. and Yes I have noticed as well the thing I'm not using physic component yet
    p6.png
     
  6. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    I disabled everything but still no more than 41FPS:

    e1.png e2.png e3.png
     

    Attached Files:

    • e1.png
      e1.png
      File size:
      99.4 KB
      Views:
      274
    • e2.png
      e2.png
      File size:
      178.2 KB
      Views:
      272
  7. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    It looks like you have something running.
    Show us your systems running, in entity debugger.

    Is that completely empty scene?
    Did you disable all game objects?
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    We should be asking what the hardware is.
     
  9. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    967
    First of, what's going on is really weird and it seems to be coming form the physics package. For some reason you have 19 calls in FixedUpdate which should be only 1 call. So no wonder why the framerate is that bad and the vertex count is that high.

    First thing to try, remove the physics package. How's the performance then? If it's better we'd need to find out why that many calls are happening.

    edit: I see you have disabled everything... Is there a Debug.Log spamming?
     
  10. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Physics can report much larger frame times if something else is slow though, so I would not be surprised if it also wasn't physics. What is the hardware/os/etc ?
     
  11. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    Well as you can see my Scene is empty nothing:
    my spec i7-4790K, 16GB and GTX 1070 win10
    I know it's low, but I use to have at least 400fps with an empty HDRP scene
    e1.png e4.png

    s2.png s3.png s4.png
     
    Last edited: Jun 21, 2021
  12. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    967
    2 things to try, use .net 2.0 - it's recommended for dots. 2nd thing, try with disabled incremental garbage collector. something is happening which is letting physics cascade into running more than once in a single frame and tripping everything up even more.

    edit: as a last resort, restart unity and if you've already done this, delete the library folder and reimport everything again.
     
  13. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I see, you are running linux?
     
  14. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    First thank you for your help
    @hippocoder: no I'm not windows10 also target is windows
    @Enzi I tried everything, on an empty scene I have no 140fps.. on my scene around 34FPS
    What I have noticed now Editor loop taking 57% of time around 30ms and a lot of gfx.waitforpresentOnGfxThread
     
  15. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Please report a bug with your minimal scene using the bug reporter tool, and when they give you a case number by email, copy the number and paste it here if you would like a potential staff reply, no guarantee but it may help get to the bottom of the mystery.
     
  16. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    Try create complete new scene. 0 objects. And run.
    Not just disabled objects.

    If that fails, try create new project.
     
  17. vectorized-runner

    vectorized-runner

    Joined:
    Jan 22, 2018
    Posts:
    398
  18. mikaelK

    mikaelK

    Joined:
    Oct 2, 2013
    Posts:
    284
    I have the same stuff happening with the entities physics package. Some debug stuff slows down editor performance.
    If you have memory you can try deep profiling.
     
  19. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    nothing really helped...
    I'll do like @hippocoder said, I'll create a mini scene and send it as a bug report.. let's see...