Mercurial > hg
comparison tests/test-debugcommands.t @ 23255:76effa770ff9
revlog: add config variable for limiting delta-chain length
The current heuristic for deciding between storing delta and full texts
is based on ratio of (sizeofdeltas)/(sizeoffulltext).
In some cases (for example a manifest for ahuge repo) this approach
can result in extremely long delta chains (~30,000) which are very slow to
read. (In the case of a manifest ~500ms are added to every hg command because of that).
This commit introduces "revlog.maxchainlength" configuration variable that will
limit delta chain length.
author | Mateusz Kwapich <mitrandir@fb.com> |
---|---|
date | Thu, 06 Nov 2014 14:20:05 -0800 |
parents | 01df3660eb11 |
children | 1c11393d5dfb |
comparison
equal
deleted
inserted
replaced
23254:d23834b871ac | 23255:76effa770ff9 |
---|---|
22 | 22 |
23 uncompressed data size (min/max/avg) : 43 / 43 / 43 | 23 uncompressed data size (min/max/avg) : 43 / 43 / 43 |
24 full revision size (min/max/avg) : 44 / 44 / 44 | 24 full revision size (min/max/avg) : 44 / 44 / 44 |
25 delta size (min/max/avg) : 0 / 0 / 0 | 25 delta size (min/max/avg) : 0 / 0 / 0 |
26 | 26 |
27 Test max chain len | |
28 $ cat >> $HGRCPATH << EOF | |
29 > [revlog] | |
30 > maxchainlen=4 | |
31 > EOF | |
32 | |
33 $ echo "This test checks if maxchainlen config value is respected also it can serve as basic test for debugrevlog -d <file>.\n" >> a | |
34 $ hg ci -m a | |
35 $ echo "b\n" >> a | |
36 $ hg ci -m a | |
37 $ echo "c\n" >> a | |
38 $ hg ci -m a | |
39 $ echo "d\n" >> a | |
40 $ hg ci -m a | |
41 $ echo "e\n" >> a | |
42 $ hg ci -m a | |
43 $ echo "f\n" >> a | |
44 $ hg ci -m a | |
45 $ echo 'g\n' >> a | |
46 $ hg ci -m a | |
47 $ echo 'h\n' >> a | |
48 $ hg ci -m a | |
49 $ hg debugrevlog -d a | |
50 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen | |
51 0 -1 -1 0 ??? 0 0 0 0 ??? ???? ? 1 0 (glob) | |
52 1 0 -1 ??? ??? 0 0 0 0 ??? ???? ? 1 1 (glob) | |
53 2 1 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob) | |
54 3 2 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob) | |
55 4 3 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 4 (glob) | |
56 5 4 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 0 (glob) | |
57 6 5 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 1 (glob) | |
58 7 6 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob) | |
59 8 7 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob) | |
60 $ cd .. | |
27 | 61 |
28 Test internal debugstacktrace command | 62 Test internal debugstacktrace command |
29 | 63 |
30 $ cat > debugstacktrace.py << EOF | 64 $ cat > debugstacktrace.py << EOF |
31 > from mercurial.util import debugstacktrace, dst, sys | 65 > from mercurial.util import debugstacktrace, dst, sys |