Mercurial > hg
diff mercurial/minirst.py @ 18878:3cfaace0441e
copies._forwardcopies: use set operations to find missing files
This is a performance win for a number of reasons:
- We don't iterate over contexts, which avoids a completely unnecessary sorted
call + the O(number of files) abstraction cost of doing that.
- We don't check membership in a context, which avoids another
O(number of files) abstraction cost.
- We iterate over the manifests in C instead of Python.
For a large repo with 170,000 files, this improves perfpathcopies from 0.34
seconds to 0.07. Anything that uses pathcopies, such as rebase or diff --git
between two revisions, benefits.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Thu, 04 Apr 2013 20:22:29 -0700 |
parents | fabbaa250977 |
children | 8ac7b85bd8f9 |