Commit 9e4ccf8
authored
Micro-optimize transitive depencency hash calculation (#20798)
In small incrementals runs targeting a very large code base, the
`transitive_dep_hash` function used up to 9% of total CPU.
Micro-optimize it by avoiding json dump, dict construction and `hex()`
calls.
I'll verify that this helps after this has been merged, but the improved
performance (esp. without orjson) seems very likely.1 parent a7e66a6 commit 9e4ccf8
1 file changed
Lines changed: 15 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
4367 | 4368 | | |
4368 | 4369 | | |
4369 | 4370 | | |
4370 | | - | |
4371 | | - | |
4372 | | - | |
4373 | | - | |
4374 | | - | |
4375 | | - | |
4376 | | - | |
4377 | | - | |
4378 | | - | |
4379 | | - | |
4380 | | - | |
| 4371 | + | |
| 4372 | + | |
| 4373 | + | |
| 4374 | + | |
| 4375 | + | |
| 4376 | + | |
| 4377 | + | |
| 4378 | + | |
| 4379 | + | |
| 4380 | + | |
| 4381 | + | |
| 4382 | + | |
| 4383 | + | |
| 4384 | + | |
4381 | 4385 | | |
4382 | 4386 | | |
4383 | 4387 | | |
| |||
0 commit comments