Commit df07d27
Parallelize TreeArtifactValue.visitTree across files instead of subdirectories.
This performs better when the subdirectories are unbalanced (and doesn't degrade catastrophically for a flat hierarchy). Most tree artifacts are too small for this to matter, but some users have very large ones (with hundreds of thousands of files) for which this can reduce the overall traversal time by 30% or more (after other, more important optimizations such as f2512a0 have been made).
Also remove the edge case for the root directory; the code is cleaner that way.
Related to #17009.
PiperOrigin-RevId: 606897861
Change-Id: I143d55a844ac191543a856f73849a955601994681 parent bb80319 commit df07d27
File tree
3 files changed
+40
-39
lines changed- src
- main/java/com/google/devtools/build/lib/skyframe
- test/java/com/google/devtools/build/lib/skyframe
3 files changed
+40
-39
lines changedLines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | 286 | | |
291 | 287 | | |
292 | 288 | | |
| |||
Lines changed: 17 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
| 521 | + | |
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
529 | | - | |
530 | | - | |
531 | | - | |
| 529 | + | |
532 | 530 | | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
| 531 | + | |
544 | 532 | | |
545 | | - | |
546 | | - | |
547 | | - | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
548 | 540 | | |
549 | | - | |
| 541 | + | |
550 | 542 | | |
551 | | - | |
552 | | - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
553 | 548 | | |
554 | 549 | | |
555 | 550 | | |
| |||
563 | 558 | | |
564 | 559 | | |
565 | 560 | | |
566 | | - | |
| 561 | + | |
567 | 562 | | |
568 | 563 | | |
569 | 564 | | |
| |||
Lines changed: 23 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
382 | 381 | | |
383 | 382 | | |
384 | 383 | | |
| 384 | + | |
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
| 408 | + | |
| 409 | + | |
413 | 410 | | |
414 | 411 | | |
415 | 412 | | |
416 | 413 | | |
417 | 414 | | |
418 | | - | |
419 | 415 | | |
420 | 416 | | |
421 | 417 | | |
| |||
425 | 421 | | |
426 | 422 | | |
427 | 423 | | |
428 | | - | |
429 | | - | |
430 | 424 | | |
431 | 425 | | |
432 | 426 | | |
| |||
450 | 444 | | |
451 | 445 | | |
452 | 446 | | |
| 447 | + | |
453 | 448 | | |
454 | 449 | | |
455 | 450 | | |
| |||
470 | 465 | | |
471 | 466 | | |
472 | 467 | | |
473 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
474 | 471 | | |
475 | 472 | | |
476 | 473 | | |
477 | 474 | | |
478 | 475 | | |
479 | 476 | | |
480 | 477 | | |
| 478 | + | |
481 | 479 | | |
482 | 480 | | |
483 | 481 | | |
484 | 482 | | |
485 | 483 | | |
486 | 484 | | |
487 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
488 | 492 | | |
489 | 493 | | |
490 | 494 | | |
| |||
493 | 497 | | |
494 | 498 | | |
495 | 499 | | |
| 500 | + | |
496 | 501 | | |
497 | 502 | | |
498 | 503 | | |
| |||
501 | 506 | | |
502 | 507 | | |
503 | 508 | | |
504 | | - | |
505 | | - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
506 | 512 | | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
507 | 517 | | |
508 | 518 | | |
509 | 519 | | |
| |||
0 commit comments