Mercurial > hg > hg-git
changeset 651:59f8ef69afb8
git_handler: use repo.changelog.node instead of repo.lookup
For a repo with over 50,000 commits, this brings down the computation of
'export' from 1.25 seconds to 0.25 seconds.
To scale this to hundreds of thousands of commits, one solution might be to
maintain the mapping in a DAG data structure mirroring the changelog, over
which findcommonmissing can be used.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Sun, 16 Feb 2014 01:11:47 -0800 (2014-02-16) |
parents | 53423381c540 |
children | ed4efc711809 |
files | hggit/git_handler.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -346,7 +346,8 @@ def export_git_objects(self): self.init_if_missing() - nodes = [self.repo.lookup(n) for n in self.repo] + clnode = self.repo.changelog.node + nodes = [clnode(n) for n in self.repo] export = [node for node in nodes if not hex(node) in self._map_hg] total = len(export) if total: