If you need a refresh on the Unity Analyzer, read Profiling Unity apps on Android before you continue.

Pull data into the Analyzer

To compare the results you will use the Analyzer to import all three datasets but we will only compare two at a time:

  1. Open the Profiler window

  2. Select Clear to clear the results

  3. Select the folder icon in the top right to load the binary recording plain.data

  4. Open the Profile Analyzer from Window/Analysis menu

  5. Set the Analyzer to mode Compare (in the top-left)

  6. Slots for two datasets will appear (both with Pull Data, Load and Save buttons)

  7. Select the Pull Data button from the top. The data will import from the Profiler.

  8. Click back to the Profiler window and Clear the data

  9. Select folder icon to load the binary data for burst.data

  10. Click back to the Analyzer and select the second Pull Data.

You now have two datasets loaded, one from the unoptimized mode and one from the Burst mode. This is what the data looks like collected from a Samsung S8.

Image Alt Text:Plain vs Burst

Focus on the collision-related markers by searching for collisioncalc in the Name Filter. Select a representative frame by clicking on a later frame where both seem relatively settled (and with no odd spikes).

We will ignore CollisionMovement because it has not been optimized and the times will vary depending on exactly how many collisions are occurring in any one frame.

The functions that have been optimized are the collision detection calculations. All characters are compared against all characters and walls. The character-wall collision detection times are collected under the sample name StaticCollisionCalculations while the character-character collisions are collected under the name DynamicCollisionCalculations.

In the top 10 markers, the unoptimized data is in blue. The Burst data is in orange. StaticCollisionCalculations is showing the biggest improvement. The data shown above is based on all frames selected. You can see individual frames if you click on the graph.

Follow the same process again but this time we will compare Burst against Neon.

Image Alt Text:Burst vs Neon

Again, we can see an improvement, mostly with the dynamic (character-character) collision detection but together it still makes a meaningful improvement.

Back
Next