]> git.proxmox.com Git - libgit2.git/commit - src/pqueue.c
Rewrite the Revision Walker
authorVicent Marti <tanoku@gmail.com>
Tue, 8 Mar 2011 12:57:03 +0000 (14:57 +0200)
committerVicent Marti <tanoku@gmail.com>
Mon, 14 Mar 2011 21:52:15 +0000 (23:52 +0200)
commit71db842fac3ba8582255bc5b61361ddef08ef105
treef4c4efa3860da60ef0f3e86c5ab6c1b4dad2d1fc
parent26022f0719f652ae8311abea6f6de92bd4a75a87
Rewrite the Revision Walker

The new revision walker uses an internal Commit object storage system,
custom memory allocator and much improved topological and time sorting
algorithms. It's about 20x times faster than the previous implementation
when browsing big repositories.

The following external API calls have changed:

`git_revwalk_next` returns an OID instead of a full commit object.
The initial call to `git_revwalk_next` is no longer blocking when
iterating through a repo with a time-sorting mode.

Iterating with Topological or inverted modes still makes the initial
call blocking to preprocess the commit list, but this block should be
mostly unnoticeable on most repositories (topological preprocessing
times at 0.3s on the git.git repo).

`git_revwalk_push` and `git_revwalk_hide` now take an OID instead
of a full commit object.
include/git2/revwalk.h
src/pqueue.c [new file with mode: 0644]
src/pqueue.h [new file with mode: 0644]
src/repository.c
src/revwalk.c
src/revwalk.h
src/util.h
tests/t05-revwalk.c