You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`@TraceRecomposition` now measures composable recomposition duration via `System.nanoTime()` IR injection
13
+
- Duration displayed in logcat output: `[Recomposition #3] UserCard (2.30ms)`
14
+
- Compiler plugin wraps composable body in try-finally for accurate timing even on exceptions
15
+
-`RecompositionEvent.durationNanos` field added for custom logger consumption
16
+
- KMP-compatible via `expect/actual currentNanoTime()` (Android/JVM supported, other platforms gracefully skip)
17
+
-**Heatmap Tooltip** — Hover over recomposition count inlay in the editor to see:
18
+
- Last recomposition duration
19
+
- Parameter changes with old/new values
20
+
- State changes with old/new values
21
+
- Unstable parameter summary
22
+
- Cumulative total recomposition count and duration
23
+
-**Heatmap logcat parser updates** — Parses `[param]` and `[state]` prefixed lines and duration from log output
24
+
25
+
### Changed
26
+
-**Shadow plugin upgraded to 9.0.0-beta12** for Gradle 9.x compatibility (plugin ID changed from `com.github.johnrengelman.shadow` to `com.gradleup.shadow`)
Copy file name to clipboardExpand all lines: compose-stability-analyzer-idea/CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,16 @@
2
2
3
3
All notable changes to the IntelliJ IDEA plugin will be documented in this file.
4
4
5
+
## [0.7.4] - 2026-04-25
6
+
7
+
### Added
8
+
-**Heatmap Tooltip** — Hover over recomposition count inlay to see last recomposition details: duration, parameter/state changes, unstable params, and cumulative totals
9
+
-**Duration display in heatmap** — Logcat parser now captures recomposition timing from `(X.XXms)` format
10
+
-**`[param]` and `[state]` prefix parsing** — Updated logcat parser to handle new log format
11
+
12
+
### Changed
13
+
- Removed manual `HintManager` tooltip in favor of `IdeTooltipManager` for correct positioning
Copy file name to clipboardExpand all lines: docs/gradle-plugin/trace-recomposition.md
+27-10Lines changed: 27 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,9 @@ fun UserProfile(user: User) {
20
20
When this composable recomposes, detailed logs appear in Logcat showing the recomposition count, each parameter's stability status, and whether the parameter's value changed since the last composition.
D/Recomposition: ├─ [state] counter: Int changed (0 → 1)
100
100
D/Recomposition: └─ State changes: [counter]
@@ -110,14 +110,31 @@ The `[param]` prefix identifies parameter tracking entries, while `[state]` iden
110
110
111
111
Use `traceStates = true` when a composable is recomposing but the parameter logs show no changes. This typically means an internal state or `CompositionLocal` is causing the recomposition, and state tracking will reveal which one.
112
112
113
+
## Recomposition Duration
114
+
115
+
Every `@TraceRecomposition` composable automatically measures how long each recomposition takes. The duration appears in the log header:
D/Recomposition: └─ [param] user: User changed (User@abc → User@def)
120
+
```
121
+
122
+
The `(2.30ms)` shows how long the composable body took to execute during this recomposition. This helps identify which composables are expensive, not just which ones recompose frequently.
123
+
124
+
Duration data is also available in `RecompositionEvent.durationNanos` for custom loggers, and is displayed in the IDE's heatmap tooltip when hovering over the recomposition count inlay.
125
+
126
+
!!! note "Platform support"
127
+
128
+
Duration measurement uses `System.nanoTime()` and is available on Android and JVM. On other KMP platforms (iOS, JS, WASM), timing is gracefully skipped and `durationNanos` will be `0`.
129
+
113
130
## Reading the Logs
114
131
115
132
Understanding the log output is key to diagnosing recomposition issues. Each log entry contains several pieces of information that, together, tell you exactly what happened and why.
**Run the app and check Logcat.** Filter by `product-card` to see only this composable's events. After scrolling through the list, you see logs appearing rapidly:
0 commit comments