Commit 3011177
pack-redundant: delay creation of unique_objects
Instead of initializing unique_objects in `add_pack()`, copy from
all_objects in `cmp_two_packs()`, when unwanted objects are removed from
all_objects.
This will save memory (no allocate memory for alt-odb packs), and run
`llist_sorted_difference_inplace()` only once when removing ignored
objects and removing objects in alt-odb in `scan_alt_odb_packs()`.
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 3173a94 commit 3011177
1 file changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
257 | 262 | | |
258 | 263 | | |
259 | 264 | | |
| |||
536 | 541 | | |
537 | 542 | | |
538 | 543 | | |
539 | | - | |
| 544 | + | |
540 | 545 | | |
541 | 546 | | |
542 | 547 | | |
| |||
567 | 572 | | |
568 | 573 | | |
569 | 574 | | |
570 | | - | |
571 | | - | |
| 575 | + | |
572 | 576 | | |
573 | 577 | | |
574 | 578 | | |
| |||
646 | 650 | | |
647 | 651 | | |
648 | 652 | | |
649 | | - | |
650 | 653 | | |
651 | 654 | | |
652 | 655 | | |
| |||
663 | 666 | | |
664 | 667 | | |
665 | 668 | | |
666 | | - | |
| 669 | + | |
667 | 670 | | |
668 | 671 | | |
669 | 672 | | |
| 673 | + | |
| 674 | + | |
670 | 675 | | |
671 | 676 | | |
672 | 677 | | |
| |||
0 commit comments