Changed profilerSummary messages to be lazy as well
Brian Vaughn committed
Mar 6, 2019 at 18:21 UTC
4257ba4983cf59e1561673555e27c1a330649e98
1 file changed
+7
-11
OVERVIEW.md
+7
-11
@@ -167,9 +167,13 @@ while (index !== currentWeight) {
167
168
All profiling information is stored on the backend while profiling is in progress. (Avoiding sending traffic across the bridge reduces the performance overhead of running the profiler.)
169
170
+The backend push-notifies the frontend of when profiling starts ("_profilingStarted_") and stops ("_profilingStopped_"). All other profiling information is lazy and must be requested by the backend.
171
+
172
### Profiling summary
173
172
-Upon completion, a "_profileSummary_" message is sent across the bridge. This message is a typed array summarizing the profiling session. It contains a repeating sequence of values (per root):
174
+When the user opens the profiling tab, the frontend asks the backend if it has any profiling data for the currently-selected root. This is done by sending a "_profileSummary_" message with an id that identifies the root.
175
+
176
+The response is a typed array summarizing the profiling session for that. It consists of the following values:
177
178
1. root id
179
1. number of interactions for the root in this profiling session
@@ -182,7 +186,7 @@ Followed by a series of tuples for each commit:
186
187
This is the minimal information required to render the main Profiler interface.
188
185
-For example, an application with two React roots might send a summary like this:
189
+Here is an example profiler summary:
190
```js
191
[
192
1, // root id
@@ -194,18 +198,10 @@ For example, an application with two React roots might send a summary like this:
198
13, // and took 13ms
199
303, // third commit started 303ms after profiling began
200
5, // and took 5ms
197
-
198
- 63, // root id
199
- 1, // one interaction was logged during this session
200
- 2, // number of commits
201
- 513, // first commit started 513ms after profiling began
202
- 8, // first commit took 8ms
203
- 711, // second commit started 711ms after profiling began
204
- 22, // second commit took 22ms
201
]
202
```
203
208
-Additional information (e.g. which components were part of a specific commit, which interactions were logged) is lazily requested by the frontend as a user interacts with the profiling data.
204
+Additional information (e.g. which components were part of a specific commit, which interactions were logged) must be lazily requested by the frontend as a user interacts with the Profiler UI.
205
206
### Commit details
207