Commit 6d9164e
RPP: disable throttling during trace collection
We have had reports of the performance panel freezing for users when
CPU throttling is active; particularly with the new 20x throttling
option. We think this is because after tracing is completed the act of
collecting + emitting all the events from the renderer (which is what
gets throttled) is very slow. This is less prevalent on big powerful M3
MacBooks but more prevalent on less powerful devices, and also more
prevalent on heavier websites which generate more trace events.
This CL updates the code so that after we stop tracing we immediately
reset the CPU throttling to 1 (e.g. no throttling). Then, after all the
events are gathered and collected, we set it back to whatever it was.
This maintains the existing behaviour of the throttling being persistent
in Devtools, but means we do not throttle during a potentially expensive
stage of the process.
Testing (unscientifically) on my M1 MacBook Pro on cnn.com with 20x
throttling, I got:
- Between 9.5-11 seconds of processing time with NO change
- Between 5-5.5 seconds of processing time with this CL
And I am fairly confident these numbers will be larger on less powerful
devices.
As a drive-by, I also updated the throttling manager to make sure that
if you set the CPU throttling to what it is already, it does nothing
rather than fire off a bunch of listeners despite the value not actually
changing.
Fixed: 376836355
Change-Id: Ie7bf7fdfca1039b549b16ae94c486189a7b3abd0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5979761
Reviewed-by: Connor Clark <[email protected]>
Commit-Queue: Paul Irish <[email protected]>
Reviewed-by: Paul Irish <[email protected]>1 parent 69c141f commit 6d9164e
File tree
2 files changed
+16
-0
lines changed- front_end
- core/sdk
- panels/timeline
2 files changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
147 | 156 | | |
148 | 157 | | |
149 | 158 | | |
150 | 159 | | |
151 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
152 | 164 | | |
153 | 165 | | |
154 | 166 | | |
| |||
0 commit comments