annotate tests/test-update-reverse.t @ 51108:0250e45040f1

revlog: add a small cache of unfiltered chunk This can provides a massive boost to the reading of multiple revision and the computation of a valid delta chain. This greatly help operation like `hg log --patch`, delta computation (helping pull/unbundle), linkrev adjustment (helping copy tracing). A first round of benchmark for `hg log --patch --limit 1000` shows improvement in the 10-20% range on "small" repository like pypy or mercurial and large improvements (about 33%) for more complex ones like netbeans and mozilla's. These speeds up are consistent with the improvement to `hg pull` (from a server sending poor deltas) I saw benchmarking this last year. Further benchmark will be run during the freeze. I added some configuration in the experimental space to be able to further test the effect of various tuning for now. This feature should fit well in the "usage/resource profile" configuration that we should land next cycle. When it does not provides a benefit the overhead of the cache seem to be around 2%, a small price for the big improvement. In addition I believe we could shave most of this overhead with a more efficent lru implementation.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 27 Oct 2023 08:54:41 +0200
parents 55c6ebd11cb9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49621
55c6ebd11cb9 tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 44724
diff changeset
1 $ hg init repo
55c6ebd11cb9 tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 44724
diff changeset
2 $ cd repo
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
3
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
4 $ touch a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
5 $ hg add a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
6 $ hg commit -m "Added a"
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff changeset
7
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
8 $ touch main
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
9 $ hg add main
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
10 $ hg commit -m "Added main"
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
11 $ hg checkout 0
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
12 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff changeset
13
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
14 'main' should be gone:
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
15
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 25125
diff changeset
16 $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 25125
diff changeset
17 .hg
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
18 a
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff changeset
19
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
20 $ touch side1
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
21 $ hg add side1
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
22 $ hg commit -m "Added side1"
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
23 created new head
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
24 $ touch side2
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
25 $ hg add side2
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
26 $ hg commit -m "Added side2"
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff changeset
27
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
28 $ hg log
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
29 changeset: 3:91ebc10ed028
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
30 tag: tip
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
31 user: test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
32 date: Thu Jan 01 00:00:00 1970 +0000
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
33 summary: Added side2
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
34
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
35 changeset: 2:b932d7dbb1e1
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
36 parent: 0:c2eda428b523
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
37 user: test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
38 date: Thu Jan 01 00:00:00 1970 +0000
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
39 summary: Added side1
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
40
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
41 changeset: 1:71a760306caf
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
42 user: test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
43 date: Thu Jan 01 00:00:00 1970 +0000
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
44 summary: Added main
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
45
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
46 changeset: 0:c2eda428b523
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
47 user: test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
48 date: Thu Jan 01 00:00:00 1970 +0000
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
49 summary: Added a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
50
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff changeset
51
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
52 $ hg heads
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
53 changeset: 3:91ebc10ed028
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
54 tag: tip
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
55 user: test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
56 date: Thu Jan 01 00:00:00 1970 +0000
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
57 summary: Added side2
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
58
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
59 changeset: 1:71a760306caf
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
60 user: test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
61 date: Thu Jan 01 00:00:00 1970 +0000
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
62 summary: Added main
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
63
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 25125
diff changeset
64 $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 25125
diff changeset
65 .hg
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
66 a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
67 side1
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
68 side2
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff changeset
69
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
70 $ hg update --debug -C 1
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
71 resolving manifests
18605
bcf29565d89f manifestmerge: pass in branchmerge and force separately
Siddharth Agarwal <sid0@fb.com>
parents: 18360
diff changeset
72 branchmerge: False, force: True, partial: False
15625
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 12279
diff changeset
73 ancestor: 91ebc10ed028+, local: 91ebc10ed028+, remote: 71a760306caf
18360
760c0d67ce5e merge: process files in sorted order
Mads Kiilerich <mads@kiilerich.com>
parents: 15625
diff changeset
74 side1: other deleted -> r
21391
cb15835456cb merge: change debug logging - test output changes but no real changes
Mads Kiilerich <madski@unity3d.com>
parents: 19095
diff changeset
75 removing side1
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
76 side2: other deleted -> r
18631
e2dc5397bc82 tests: update test output (will be folded into parent)
Bryan O'Sullivan <bryano@fb.com>
parents: 18605
diff changeset
77 removing side2
21391
cb15835456cb merge: change debug logging - test output changes but no real changes
Mads Kiilerich <madski@unity3d.com>
parents: 19095
diff changeset
78 main: remote created -> g
18631
e2dc5397bc82 tests: update test output (will be folded into parent)
Bryan O'Sullivan <bryano@fb.com>
parents: 18605
diff changeset
79 getting main
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
80 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff changeset
81
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 25125
diff changeset
82 $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 25125
diff changeset
83 .hg
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
84 a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12156
diff changeset
85 main
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff changeset
86