.editorconfig
author Martijn Pieters <mj@zopatista.com>
Wed, 11 Jul 2018 14:28:13 +0100
changeset 38661 8ac0c9cd4c48
parent 38281 1d6066336d7b
child 45392 c25efc468a49
permissions -rw-r--r--
fncache: avoid loading the filename cache when not actually modifying it With time, fncache can become very large. The mozilla-central repo for example, has a 31M and growing fncache file. Loading this file takes time (280ms for the mozilla-central repository). In many scenarios, we don't need to load fncache at all. For example, when committing changes to existing files, or pushing such commits to another clone. This patch detects when a name is added via store.vfs(), and only loads the cache if a) the data metadata file doesn't already exist, or b) when opening for appending, the data or metadata file exists but has size (a transaction rollback leaves behind such files). Benchmarks (run on Macos 10.13 on a 2017-model Macbook Pro with Core i7 2.9GHz and flash drive), each test without and with patch run 5 times: * committing to an existing file, against the mozilla-central repository. Baseline real time average 2.3736, with patch 1.9884. * unbundling a large changeset consisting *only* of existing-file modifications (159 revisions, 1050 modifications, mozilla-central 4a250a0e4f29:beea9ac7d823), into a clone limited to the ancestor revision of that revset). Baseline real time average 1.5048, with patch 1.3108.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28793
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     1
# See http://EditorConfig.org for the specification
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     2
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     3
root = true
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     4
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     5
[*.py]
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     6
indent_size = 4
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     7
indent_style = space
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     8
trim_trailing_whitespace = true
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
     9
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
    10
[*.{c,h}]
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
    11
indent_size = 8
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
    12
indent_style = tab
d30fdd6d1bf7 mercurial: add editorconfig
Jun Wu <quark@fb.com>
parents:
diff changeset
    13
trim_trailing_whitespace = true
38281
1d6066336d7b mercurial: add .t files to .editorconfig
Gregory Szorc <gregory.szorc@gmail.com>
parents: 28793
diff changeset
    14
1d6066336d7b mercurial: add .t files to .editorconfig
Gregory Szorc <gregory.szorc@gmail.com>
parents: 28793
diff changeset
    15
[*.t]
1d6066336d7b mercurial: add .t files to .editorconfig
Gregory Szorc <gregory.szorc@gmail.com>
parents: 28793
diff changeset
    16
indent_size = 2
1d6066336d7b mercurial: add .t files to .editorconfig
Gregory Szorc <gregory.szorc@gmail.com>
parents: 28793
diff changeset
    17
indent_style = space
1d6066336d7b mercurial: add .t files to .editorconfig
Gregory Szorc <gregory.szorc@gmail.com>
parents: 28793
diff changeset
    18
trim_trailing_whitespace = false