Show More
@@ -661,12 +661,23 b' def _rawgroups(revlog, p1, p2, cachedelt' | |||
|
661 | 661 | yield parents |
|
662 | 662 | |
|
663 | 663 | if sparse and parents: |
|
664 | snapshots = collections.defaultdict(list) # map: base-rev: snapshot-rev | |
|
664 | 665 | # See if we can use an existing snapshot in the parent chains to use as |
|
665 | 666 | # a base for a new intermediate-snapshot |
|
666 | bases = [] | |
|
667 | # | |
|
668 | # search for snapshot in parents delta chain | |
|
669 | # map: snapshot-level: snapshot-rev | |
|
670 | parents_snaps = collections.defaultdict(set) | |
|
667 | 671 | for p in parents: |
|
668 |
|
|
|
669 | yield tuple(sorted(bases)) | |
|
672 | for idx, s in enumerate(deltachain(p)): | |
|
673 | if not revlog.issnapshot(s): | |
|
674 | break | |
|
675 | parents_snaps[idx].add(s) | |
|
676 | # Test them as possible intermediate snapshot base | |
|
677 | # We test them from highest to lowest level. High level one are more | |
|
678 | # likely to result in small delta | |
|
679 | for idx, snaps in sorted(parents_snaps.items(), reverse=True): | |
|
680 | yield tuple(sorted(snaps)) | |
|
670 | 681 | # No suitable base found in the parent chain, search if any full |
|
671 | 682 | # snapshots emitted since parent's base would be a suitable base for an |
|
672 | 683 | # intermediate snapshot. |
@@ -675,8 +686,7 b' def _rawgroups(revlog, p1, p2, cachedelt' | |||
|
675 | 686 | # revisions instead of starting our own. Without such re-use, |
|
676 | 687 | # topological branches would keep reopening new full chains. Creating |
|
677 | 688 | # more and more snapshot as the repository grow. |
|
678 |
snapfloor = min( |
|
|
679 | snapshots = collections.defaultdict(list) | |
|
689 | snapfloor = min(parents_snaps[0]) + 1 | |
|
680 | 690 | _findsnapshots(revlog, snapshots, snapfloor) |
|
681 | 691 | yield tuple(snapshots[nullrev]) |
|
682 | 692 |
@@ -77,7 +77,7 b' repeatedly while some of it changes rare' | |||
|
77 | 77 | |
|
78 | 78 | |
|
79 | 79 | $ f -s .hg/store/data/*.d |
|
80 |
.hg/store/data/_s_p_a_r_s_e-_r_e_v_l_o_g-_t_e_s_t-_f_i_l_e.d: size=6 |
|
|
80 | .hg/store/data/_s_p_a_r_s_e-_r_e_v_l_o_g-_t_e_s_t-_f_i_l_e.d: size=63812493 | |
|
81 | 81 | $ hg debugrevlog * |
|
82 | 82 | format : 1 |
|
83 | 83 | flags : generaldelta |
@@ -89,39 +89,45 b' repeatedly while some of it changes rare' | |||
|
89 | 89 | empty : 0 ( 0.00%) |
|
90 | 90 | text : 0 (100.00%) |
|
91 | 91 | delta : 0 (100.00%) |
|
92 |
snapshot : 1 |
|
|
92 | snapshot : 179 ( 3.58%) | |
|
93 | 93 | lvl-0 : 4 ( 0.08%) |
|
94 |
lvl-1 : |
|
|
95 |
lvl-2 : |
|
|
96 | deltas : 4875 (97.48%) | |
|
97 | revision size : 67810463 | |
|
98 | snapshot : 14373347 (21.20%) | |
|
99 | lvl-0 : 804235 ( 1.19%) | |
|
100 | lvl-1 : 13535903 (19.96%) | |
|
101 |
lvl- |
|
|
102 | deltas : 53437116 (78.80%) | |
|
94 | lvl-1 : 49 ( 0.98%) | |
|
95 | lvl-2 : 56 ( 1.12%) | |
|
96 | lvl-3 : 63 ( 1.26%) | |
|
97 | lvl-4 : 7 ( 0.14%) | |
|
98 | deltas : 4822 (96.42%) | |
|
99 | revision size : 63812493 | |
|
100 | snapshot : 10745878 (16.84%) | |
|
101 | lvl-0 : 804204 ( 1.26%) | |
|
102 | lvl-1 : 4986508 ( 7.81%) | |
|
103 | lvl-2 : 2858810 ( 4.48%) | |
|
104 | lvl-3 : 1958906 ( 3.07%) | |
|
105 | lvl-4 : 137450 ( 0.22%) | |
|
106 | deltas : 53066615 (83.16%) | |
|
103 | 107 | |
|
104 | 108 | chunks : 5001 |
|
105 | 109 | 0x78 (x) : 5001 (100.00%) |
|
106 |
chunks size : 6 |
|
|
107 |
0x78 (x) : 6 |
|
|
110 | chunks size : 63812493 | |
|
111 | 0x78 (x) : 63812493 (100.00%) | |
|
108 | 112 | |
|
109 |
avg chain length : 1 |
|
|
113 | avg chain length : 17 | |
|
110 | 114 | max chain length : 45 |
|
111 |
max chain reach : 2 |
|
|
112 |
compression ratio : 2 |
|
|
115 | max chain reach : 27506743 | |
|
116 | compression ratio : 27 | |
|
113 | 117 | |
|
114 | 118 | uncompressed data size (min/max/avg) : 346468 / 346472 / 346471 |
|
115 |
full revision size (min/max/avg) : 2010 |
|
|
116 |
inter-snapshot size (min/max/avg) : 1 |
|
|
117 |
level-1 (min/max/avg) : 1 |
|
|
118 |
level-2 (min/max/avg) : |
|
|
119 |
|
|
|
119 | full revision size (min/max/avg) : 201007 / 201077 / 201051 | |
|
120 | inter-snapshot size (min/max/avg) : 13223 / 172097 / 56809 | |
|
121 | level-1 (min/max/avg) : 13223 / 172097 / 101765 | |
|
122 | level-2 (min/max/avg) : 28558 / 85237 / 51050 | |
|
123 | level-3 (min/max/avg) : 14647 / 41752 / 31093 | |
|
124 | level-4 (min/max/avg) : 18596 / 20760 / 19635 | |
|
125 | delta size (min/max/avg) : 10649 / 104791 / 11005 | |
|
120 | 126 | |
|
121 |
deltas against prev : 4 |
|
|
122 |
where prev = p1 : 41 |
|
|
127 | deltas against prev : 4171 (86.50%) | |
|
128 | where prev = p1 : 4127 (98.95%) | |
|
123 | 129 | where prev = p2 : 0 ( 0.00%) |
|
124 |
other : 4 |
|
|
125 |
deltas against p1 : 6 |
|
|
126 |
deltas against p2 : 1 |
|
|
130 | other : 44 ( 1.05%) | |
|
131 | deltas against p1 : 633 (13.13%) | |
|
132 | deltas against p2 : 18 ( 0.37%) | |
|
127 | 133 | deltas against other : 0 ( 0.00%) |
General Comments 0
You need to be logged in to leave comments.
Login now