We are excited to announce the first experimental release of the Jobs Profiler package, a new tool designed to give developers deeper insights into Unity’s Job System performance and behavior.
What is the Jobs Profiler?
The Jobs Profiler extends Unity’s existing profiling capabilities by providing:
Detailed job dependency inspection - Get a clearer view of how your jobs are interconnected and where potential bottlenecks may occur
Enhanced per-frame statistics - Access more granular performance data to help optimize your job-based code
Improved debugging workflow - Better understand the execution flow of your job dependencies
Important Notes
This is an experimental release. As with any experimental package, you should expect:
Potential bugs and stability issues
Features that may change in future releases
System Requirements:
Unity 6.0 or later
How to install
Currently the package is hidden, so the way to install it is to add this line into your manifest.json file: “com.unity.jobsprofiler”: “0.0.1-exp.4”
How to use it
After adding the package to your project navigate to Window → Analyst → Profiler and then select “New Timelime (Experimental)” from the Timeline dropdown
Nice tool! One thing Filter actually filters timeline itself (and that’s very cool) but maybe consider option in Display settings to Toggle that behaviour on and of? (when we only need to filter rows in table below but not timeline itself)
Red lines means that the main thread is waiting for the job to be finished. Sometimes the job system will try to do work on the main thread at the same time. The idea with the red and green lines is to indicate when you are waiting on the job on the main thread to make it easier to see if you are “stalling” the main thread or not.
Good point about the filtering on/off. I will write it down as an improvement.
Re collapsing threads/workers:
This is what I’m working on right now. The reason it wasn’t added directly is that I want to do something that is a bit better compared to how the regular profiling view works currently so there is a bit of research going on to try to figure out a better way to do this and also some experimentation.
Our dependency chains became relatively complicated, so I was happy to have a tool to traverse them visually! It’s also very nice to see where things are scheduled and completed: just by scrolling through the view I’ve identified a system that was scheduling and completing jobs in the same function.
I’ve a couple of minor things I ran into. I suppose these are on your radar already, but anyway:
Pressing F for zoom always resets the view to the frame, rather than zooming to the current selection.
Edit: this seems to work when selecting specific events in the timeline view only
I’m missing zoom & filtering on current selected job name:
Zoom on total range of selection
Zoom on first job of current selection
Cycle between jobs of current selection
Zoom to current selected range
Filtering with search functionality removes all context, but can’t zoom to job(s) range to find them
I think I’d prefer to still see where I am
Would like to be able to zoom to the timeline’s current selected job, and perhaps to its range of in and out dependencies
Experimental settings don’t seem to be working?
Vertical zoom doesn’t work (the horizontal scrolling is disabled though)
I assume zoom on event hover is for the dependencies; toggling this option doesn’t change behaviour
Maybe a modifier key for zooming horizontal vs. vertical?
I feel like “what depends on this job” and “this job(s) depends on” are inverted? Maybe a language thing, I don’t know. I thought “what depends on this job” would be what comes after this job? But it shows the job(s) that come before
Can’t scroll in the dependency lists
Sometimes it’s not possible to click on very small jobs that are neighbouring another, like this dark yellow job here:
I am not sure of its usefulness in practice, but I think I’d like to be able to make some of the engine dependencies “transparent”, i.e. “pass through” the EngineJob and SomeJob (Cleanup) dependencies. This could slightly speed up traversing a dependency chain
I also encountered memory leaks reported by the job leak detection, mostly coming from com.unity.jobsprofiler@d27de5654f1f/Editor/PrimitiveRenderer.cs line 33/34, and one each from the TimelineBarView constructor & TimelineBarView.ScheduleJobs
Hey, Thanks for all the reports and suggestions. Some of them has been planned already, but some are things I haven’t thought about. I will make sure to address some of them when a new version gets released.
I see the vertical zoom setting but it doesn’t seem to be doing anything. There really needs to be a way to zoom vertically to see all the jobs at a quick glance rather than panning up and down.
Unity spawns 30 workers on my personal laptop that I am testing and having to pan up and pan down is just a pain. Now imagine this with my work computer which can spawn 128. Scroll scroll scroll scroll and I’m not even halfway down the timeline viewer.
Sorry for the delay, but com.unity.jobsprofiler@0.0.1-exp.5 has now been released with the initial group and thread folding implemented. One known issue right now is that if you have a job selected from the main thread and you fold the main thread it may get a bit confused on where to draw the lines. I will try to figure something out here, but I think it’s still a good enough improvement to have a new version out.