Commit 55b30ce
Backport performance debugging improvements
Backports some CDP Performance features and stability improvements to `0.83-stable`.
This includes:
- Remaining implementation of Frame Timings and screenshot capture in performance traces (Android)
- New support for Frame Timings and screenshot capture on iOS
- Optimisations to trace chunk generation, memory usage during performance recording
- `Page.captureScreenshot` (Android, iOS)
All features remain gated behind feature flags (`fuseboxFrameRecordingEnabled`, `fuseboxScreenshotCaptureEnabled`).
**Commits applied**
- Define TracingCategory enum (#54377) bd6c6bf
- Use TracingCategory in TraceEvent (#54378) ce60f27
- Simple parser for serialized tracing categories (#54379) 62275b6
- Propagate tracing categories to recording state (#54380) 3841ef0
- Re-land "Revert D85999774: [rn][android] Add FrameTiming module" (#54502) 85905ad
- Add screenshot category (#54537) 5d9cb80
- Define HostTargetTracingDelegate (#54622) be0dae0
- Define TracingDelegate for Android Host (#54628) a212e95
- Use new API for tracing state on Android (#54629) 532d0be
- Internalize TracingState interface (#54631) 58ec261
- Move TracingState interfaces to inspector package (#54632) 10d0d99
- Rename values of TracingState enum (#54630) be94707
- FrameTiming module to subscribe to Inspector tracing lifecycle (#54633) 04ee02b
- Clarify HostTracingProfile and HostTraceRecordingState (#54677) ec92f12
- Introduce TimeWindowedBuffer (#54679) d6ee54f
- Keep tracing time window on TraceRecordingState (#54673) e651563
- Define FrameTimingSequence (#54674) 5b7d92f
- Define an endpoint on HostTarget to capture frame timings (#54672) f469aa3
- Extract frame trace events construction logic (#54675) 57973fa
- Define serializers for frame timings as part of HostTargetTracingProfile (#54681) 587d360
- Propagate Frames data through Host (#54671) 26ff069
- Cleanup no longer used jni layer for frame timings (#54678) 9ba4ce6
- Fix screenshot typo (#54742) 52186a3
- Add optional screenshot argument to FrameTimingSequence (#54743) 57c29fc
- Frame screenshot event generation (#54744) b447d26
- Frame screenshots capture implementation (#54745) f3c9a8d
- BeginDrawing: INTENDED_VSYNC_TIMESTAMP -> VSYNC_TIMESTAMP (#54765) 9221772
- Add frames category (#54768) 31a0c9a
- Specify correct category for SetLayerTreeId event (#54769) cd055e9
- Reduce the screenshots size (#54800) e4a5a56
- Remove Commit from FrameTimingSequence (#54779) 39f7703
- Fix potential bitmap leaks in FrameTimingsObserver (#55652) 3918dd1
- Capture initial screenshot when starting frame timing trace (#55720) 863f5c0
- Refactor FrameTimingsObserver for multi-activity support (#55740) 8230f3b
- Reorder FrameTimingsObserver methods (#55743) f56b295
- Increase frame capture quality, apply scaling after DPI normalization (#55731) e5f9f5f
- Fix FrameTimingsObverver to initiate PixelCopy on main thread (#55744) d552f2a
- Fix bitmap reuse race condition in FrameTimingsObserver (#55745) 3924768
- Fix trailing frame capture after recording ended (#55704) 47684ca
- Move base64Encode into react/utils (#55873) 422770d
- Move screenshot Base64 encoding to trace serialization (#55803) dc4c36e
- Restore inspector addPage listener callback (#55925) 8c763fc
- Add tracing helper functions for RNDT traces in C++ and Kotlin (#55935) 4f3f536
- Introduce fuseboxFrameRecordingEnabled flag, gate existing code (#55941) 1aa7a32
- Implement Performance frames and screenshots on iOS (#56015) 64a1a10
- Add pixel diffing to RCTFrameTimingsObserver (#56043) 9d231af
- Add dynamic sampling to frame screenshots (#56048) d309cda
- Switch trace event chunks from event count to size based (#56080) d3b33f5
- Increase trace screenshot scale factor to 1x (#56079) 972a30d
- Add Page.captureScreenshot CDP support (#56307) 77332d2
- Fix data race on PerformanceObserver entry buffer (#56352) 5eb1ca1
- [LOCAL] Remove stale frame event code from PerformanceTracer
- [LOCAL] Update Podfile.lock1 parent ad2f7b4 commit 55b30ce
File tree
94 files changed
+3824
-416
lines changed- .claude
- packages
- react-native
- ReactAndroid
- api
- src/main
- java/com/facebook/react
- devsupport
- inspector
- interfaces
- perfmonitor
- internal
- featureflags
- tracing
- runtime
- jni
- react
- devsupport
- featureflags
- runtime/jni
- third-party/folly
- ReactCommon
- jsinspector-modern
- tests
- utils
- tracing
- tests
- react
- featureflags
- nativemodule/featureflags
- performance/timeline
- runtime/platform/ios/ReactCommon
- utils
- React/DevSupport
- scripts/featureflags
- src/private/featureflags
- specs
- rn-tester
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
94 files changed
+3824
-416
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
Lines changed: 183 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2257 | 2257 | | |
2258 | 2258 | | |
2259 | 2259 | | |
2260 | | - | |
2261 | | - | |
2262 | | - | |
2263 | | - | |
2264 | | - | |
2265 | | - | |
2266 | | - | |
2267 | | - | |
2268 | | - | |
2269 | 2260 | | |
2270 | 2261 | | |
2271 | 2262 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
69 | | - | |
70 | | - | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | | - | |
| 401 | + | |
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
| 413 | + | |
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments