perf: stop creating new revlog by hand in perftags
It's better to let the repository logic create its own object. We now just clear
the cache. New object will be automatically created from there.
revlog: update the documentation for `trim_endidx`
The function role drifted since the function was commented.
revlog: properly detect corrupted revlog in `index_get_length`
Pointed out by Yuya Nishihara.
perf: rename `perfhelper-tracecopies` to `perfhelper-pathcopies`
The command it supports is called `perfpathcopies`. It seems better to align the
names.
perf: add a docstring to `perfpathcopies`
This will help people to find this command.
revlog: update the docstring of `ancestors` to match reality
Code using this method expect the revision to be (reverse) sorted. As pointed by
Yuya Nishihara, the docstring should reflect that.
remotefilelog: fix typo in docstring
Differential Revision: https://phab.mercurial-scm.org/D5306
store: append to fncache if there are only new files to write
Before this patch, if we have to add a new entry to fncache, we write the whole
fncache again which slows things down on large fncache which have millions of
entries. Addition of a new entry is common operation while pulling new files or
commiting a new file.
This patch adds a new fncache.addls set which keeps track of the additions
happening and store them. When we write the fncache, we will just read the addls
set and append those entries at the end of fncache.
We make sure that the entries are new entries by loading the fncache and making
sure entry does not exists there. In future if we can check if an entry is new
without loading the fncache, that will speed up things more.
Performance numbers for commiting a new file:
mercurial repo
before: 0.
08784651756286621
after: 0.
08474504947662354
mozilla-central
before: 1.
83314049243927
after: 1.
7054164409637451
netbeans
before: 0.
7953150272369385
after: 0.
7202838659286499
pypy
before: 0.
17805707454681396
after: 0.
13431048393249512
In our internal repo, the performance improvement is in seconds.
I have used octobus's ASV perf benchmark thing to get the above numbers. I also
see some minute perf improvements related to creating a new commit without a new
file, but I believe that's just some noise.
Differential Revision: https://phab.mercurial-scm.org/D5301
py3: fix couple of division operator to do integer divison
Differential Revision: https://phab.mercurial-scm.org/D5305
py3: use dict.items() instead of dict.iteritems()
dict.iteritems() does not exist on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5304