Commit 74dcf3b
Add some profiling spans for slow null builds with Skycache
- `initAnalysisCacheClient`: Creating the `analysisCacheClient` the first time in each invocation is slow because we re-establish the RPC connection (accounts for ~1.1s). This isn't super straightforward to fix, but at least adding a profile span here will cover a thus far "unexplained" timespan.
- `getDeserializedKeys`: This is the part where we dig up all SkyKeys that were deserialized instead of directly evaluated, and invalidate them. Compared to `initAnalysisCacheClient` above, this is usually not very big.
- Also applied a minor optimization here: `getDoneValues()` produces a filtered view of the `InMemoryGraph`, which we then filtered further using `parallelStream()`. We could just filter once by directly calling `getAllNodeEntries()` instead.
PiperOrigin-RevId: 882580327
Change-Id: Ia4e2282a9158d5c66801d942ffba58128e6387ac1 parent 5b86904 commit 74dcf3b
File tree
3 files changed
+17
-8
lines changed- src/main/java/com/google/devtools/build/lib/skyframe
- serialization/analysis
3 files changed
+17
-8
lines changedLines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
318 | 317 | | |
319 | 318 | | |
320 | 319 | | |
| |||
612 | 611 | | |
613 | 612 | | |
614 | 613 | | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
620 | 622 | | |
621 | 623 | | |
622 | 624 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| 387 | + | |
387 | 388 | | |
388 | 389 | | |
389 | 390 | | |
| |||
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
265 | 267 | | |
266 | 268 | | |
267 | 269 | | |
268 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
269 | 275 | | |
270 | 276 | | |
271 | 277 | | |
| |||
278 | 284 | | |
279 | 285 | | |
280 | 286 | | |
281 | | - | |
| 287 | + | |
282 | 288 | | |
283 | 289 | | |
284 | 290 | | |
| |||
0 commit comments