Commit 29b489f
RPP: small performance wins in SamplesHandler
These don't move the needle a considerable amount, but they will save
some effort:
1. The `nodes` array that we created is removed. We create it, populate
it, and then push each item onto `cdpProfile.nodes`. We can instead
create the node + push it on in the same loop, rather than having two
loops.
2. Use `for(const key in traceIds)` rather than `Object.entries` to
avoid the extra work that gets done.
[email protected]
Bug: 436491188
Change-Id: I54daf25c504079af61836e5c641287b55b786470
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6827922
Reviewed-by: Alina Varkki <[email protected]>
Auto-Submit: Jack Franklin <[email protected]>
Commit-Queue: Alina Varkki <[email protected]>1 parent 947f3e9 commit 29b489f
1 file changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
| |||
166 | 165 | | |
167 | 166 | | |
168 | 167 | | |
169 | | - | |
| 168 | + | |
170 | 169 | | |
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
174 | | - | |
175 | 173 | | |
176 | 174 | | |
177 | 175 | | |
178 | 176 | | |
179 | 177 | | |
180 | | - | |
181 | | - | |
182 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
183 | 181 | | |
184 | 182 | | |
| 183 | + | |
185 | 184 | | |
186 | 185 | | |
187 | 186 | | |
| |||
0 commit comments