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.

Question Help with Profiling Performance - Physics Jobs

Discussion in 'Physics for ECS' started by EternalAmbiguity, Jan 14, 2023.

  1. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,137
    I'm not sure if this belongs here or elsewhere because it seems to involve Burst Physics Jobs. If it goes somewhere else, let me know.

    I have a game that uses entities for the enemies. They're on a grid system and they grow in an exponential manner (they don't really move, just individual entities grow). I've noticed some poor performance so I'm trying to profile to see what's wrong. See the two attached images.

    profiler_1.png profiler_2.png

    It looks like these physics jobs (CreateRigidBodies, PrepareStaticBodyDataJob, BuildFirstNLevelsJob, CheckColliderIntegrity, etc.) are taking the most time and I don't really understand what they're doing. When I look them up online I only find vague threads here--nothing explaining what they do and how one might optimize them.

    Currently using 2021.3.16f1. Burst is 1.8.2, Entities (and Physics) is 0.51.1-preview.21, and Jobs is 0.70.0-preview.7.

    Can anyone give any guidance on what these things are and how one might optimize them?