Search Unity

Performance drop with attached entities

Discussion in 'Entity Component System' started by GilCat, Feb 5, 2019.

  1. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    676
    I'm having a big performance drop in the TransformSystem when i have entities attached (~50% drop).
    There seems to be loads of work in InnerTreeLocalToParent, LeafLocalToParent and LeafLocalToWorld jobs.
    Is anyone having some kind of issue like this?
    AttachPerformance.jpg

    For testing purposes i'm just spawning 2000 entities each with one entity attached. Each entity has Position, Rotation and Scale and a RenderMesh nothing else. I can attach a simple project if necessary.

    Thanks
     
  2. RecursiveEclipse

    RecursiveEclipse

    Joined:
    Sep 6, 2018
    Posts:
    298
    Is Burst off? RenderBoundsUpdateSystem:BoundsJob is burst compilable in my version, and yours doesn't show that, the render system & transform system chug hard without burst. TransformSystem/EndFrameTransformSystem also get a big hit from from editor until you build.
     
    GilCat likes this.
  3. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    676
    Burst is on and i have all safety checks off in the editor. The standalone version has almost the same performance.
     
  4. RecursiveEclipse

    RecursiveEclipse

    Joined:
    Sep 6, 2018
    Posts:
    298
    Hmm, maybe restart? If not then I'm out of ideas, I find it suspect that none of the jobs in your image show burst is running though. For reference I get sub .25ms or less for each of TransformSystems jobs(except InnerTreeLocalToWorld which is 1-2ms) in editor with 50k entities total, attached like A->B->C->D->E.
     
    GilCat likes this.
  5. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    676
    For some reason Burst was not kicking. I had to turn it off and on. Now it's fine.
    Thanks