Search Unity

What is the right way to deep profile a system ?

Discussion in 'Entity Component System' started by Opeth001, Feb 7, 2020.

  1. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    Hello Everyone!

    im currently working on a system which is running at 0.25ms when using the normal profiling mode. but i cant really see what's going on within my jobs (Bursted). by enabling the deep profiling mode everything becomes super slow even a simple GetArchetypeChunkComponentType<ComponentType>() eats performance. so no way to see the real performance issues.

    What is the right way to deep profile a system ?

    Thanks!
     
  2. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,267
    You can only profile at job granularity with Burst. If you got a Bursted job taking longer than you like, you can try and break it up into several jobs to see what part is slow. Deep Profiling isn't going to help you as much as capturing a frame in the Timeline view showing all the threads. If you don't know how to interpret it, post it and I or someone else can help you break it down.
     
    Opeth001 likes this.
  3. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    You don't need to profile burst itself on small parts of your code that have performance issues. It has a fairly consistent impact you can reason about separately. So really all the normal best practices apply here. Isolate the code in question so it's testable outside of the job system and do some unit tests on the core logic.
     
    Opeth001 likes this.