Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Performance of indexing blob metadata

> start a RevWalk from the tip of a branch. Create a Map<String,
> RevCommit> to hold the most recent commit that modified each file.
> Prefill this map with a TreeWalk on the tip of the branch. This tells
> you how many files you need to locate the RevCommit for.
> 
> Run a loop over the RevWalk, popping each RevCommit. When you get a
> RevCommit, diff that RevCommit against its parent using a TreeWalk
> with TreeFilter.ANY_DIFF set on it. 

This algorithm works MUCH better.  Combining this with branch ordering
(default followed by remaining locals in reverse chronological order)
I'm down to ~12 seconds to index JGit master commits and blobs with the
appropriate metadata.  This is a big improvement, thanks for the help.

-J


Back to the top