Class

RecompositionTracer

Collects recomposition flow events.

Source set: JvmAndAndroid
public class RecompositionTracer

Collects recomposition flow events.

Tracks the causal flow between state reads/writes and recomposition of RecomposeScopes by connecting to recomposition lifecycle and Snapshot state events.

The traces are recorded in the Perfetto trace format through a provided TraceCollector.

NOTE: Recomposition tracing captures a stack trace and instance string on all state reads and writes, which results a significant overhead. Avoid using it in production.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: