##// END OF EJS Templates
snapshot: try intermediate snapshot against parents' base...
Boris Feld -
r39528:a33f394b default
parent child Browse files
Show More
@@ -618,8 +618,10 b' def _rawgroups(revlog, p1, p2, cachedelt'
618 The group order aims at providing fast or small candidates first.
618 The group order aims at providing fast or small candidates first.
619 """
619 """
620 gdelta = revlog._generaldelta
620 gdelta = revlog._generaldelta
621 sparse = revlog._sparserevlog
621 curr = len(revlog)
622 curr = len(revlog)
622 prev = curr - 1
623 prev = curr - 1
624 deltachain = lambda rev: revlog._deltachain(rev)[0]
623
625
624 # First we try to reuse a the delta contained in the bundle.
626 # First we try to reuse a the delta contained in the bundle.
625 # (or from the source revlog)
627 # (or from the source revlog)
@@ -647,6 +649,14 b' def _rawgroups(revlog, p1, p2, cachedelt'
647 # Test all parents (1 or 2), and keep the best candidate
649 # Test all parents (1 or 2), and keep the best candidate
648 yield parents
650 yield parents
649
651
652 if sparse and parents:
653 # See if we can use an existing snapshot in the parent chains to use as
654 # a base for a new intermediate-snapshot
655 bases = []
656 for p in parents:
657 bases.append(deltachain(p)[0])
658 yield tuple(sorted(bases))
659
650 # other approach failed try against prev to hopefully save us a
660 # other approach failed try against prev to hopefully save us a
651 # fulltext.
661 # fulltext.
652 yield (prev,)
662 yield (prev,)
@@ -77,7 +77,7 b' repeatedly while some of it changes rare'
77
77
78
78
79 $ f -s .hg/store/data/*.d
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=74365490
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=72315280
81 $ hg debugrevlog *
81 $ hg debugrevlog *
82 format : 1
82 format : 1
83 flags : generaldelta
83 flags : generaldelta
@@ -89,33 +89,36 b' repeatedly while some of it changes rare'
89 empty : 0 ( 0.00%)
89 empty : 0 ( 0.00%)
90 text : 0 (100.00%)
90 text : 0 (100.00%)
91 delta : 0 (100.00%)
91 delta : 0 (100.00%)
92 snapshot : 101 ( 2.02%)
92 snapshot : 145 ( 2.90%)
93 lvl-0 : 101 ( 2.02%)
93 lvl-0 : 15 ( 0.30%)
94 deltas : 4900 (97.98%)
94 lvl-1 : 130 ( 2.60%)
95 revision size : 74365490
95 deltas : 4856 (97.10%)
96 snapshot : 20307865 (27.31%)
96 revision size : 72315280
97 lvl-0 : 20307865 (27.31%)
97 snapshot : 18481085 (25.56%)
98 deltas : 54057625 (72.69%)
98 lvl-0 : 3016019 ( 4.17%)
99 lvl-1 : 15465066 (21.39%)
100 deltas : 53834195 (74.44%)
99
101
100 chunks : 5001
102 chunks : 5001
101 0x78 (x) : 5001 (100.00%)
103 0x78 (x) : 5001 (100.00%)
102 chunks size : 74365490
104 chunks size : 72315280
103 0x78 (x) : 74365490 (100.00%)
105 0x78 (x) : 72315280 (100.00%)
104
106
105 avg chain length : 23
107 avg chain length : 18
106 max chain length : 45
108 max chain length : 45
107 max chain reach : 11039464
109 max chain reach : 32095083
108 compression ratio : 23
110 compression ratio : 23
109
111
110 uncompressed data size (min/max/avg) : 346468 / 346472 / 346471
112 uncompressed data size (min/max/avg) : 346468 / 346472 / 346471
111 full revision size (min/max/avg) : 200927 / 201202 / 201067
113 full revision size (min/max/avg) : 200990 / 201151 / 201067
112 inter-snapshot size (min/max/avg) : 0 / 0 / 0
114 inter-snapshot size (min/max/avg) : 37202 / 173034 / 118962
113 delta size (min/max/avg) : 10649 / 103898 / 11032
115 level-1 (min/max/avg) : 37202 / 173034 / 118962
116 delta size (min/max/avg) : 10649 / 104791 / 11086
114
117
115 deltas against prev : 4231 (86.35%)
118 deltas against prev : 4185 (86.18%)
116 where prev = p1 : 4172 (98.61%)
119 where prev = p1 : 4139 (98.90%)
117 where prev = p2 : 0 ( 0.00%)
120 where prev = p2 : 0 ( 0.00%)
118 other : 59 ( 1.39%)
121 other : 46 ( 1.10%)
119 deltas against p1 : 651 (13.29%)
122 deltas against p1 : 647 (13.32%)
120 deltas against p2 : 18 ( 0.37%)
123 deltas against p2 : 24 ( 0.49%)
121 deltas against other : 0 ( 0.00%)
124 deltas against other : 0 ( 0.00%)
General Comments 0
You need to be logged in to leave comments. Login now