previous      content      next
Excessive garbage allocation

How to find excessive garbage allocation?

Purpose: Reduce time that garbage collector spends on collecting temporary objects.

Let us assume there is a task in your application that you want to profile.

  • Run profiling-enabled application.
  • Connect to application.

    Find "Garbage Collection" telemetry tab on the session panel. This telemetry will help you estimate garbage collector load. If garbage collection takes a significant amount of time, it is advised to profile memory allocation to pin-point and optimize the problematic code.

    You can explicitly run garbage collection using "Force Garbage Collection" toolbar button (1)

  • Start recording allocations (with default settings) right before the task is started.
  • Wait until the task finishes or performs long enough.
  • Capture memory snapshot and stop allocation recording.
  • Open snapshot and use Garbage Collection view.

Optionally, the profiled application can be launched with allocation recording started. Memory snapshot with recorded allocation information can be captured automatically on profiled application exit and/or on low memory. Read more in the Additional options section.

previous      content      next