On Thu, 8 Feb 2018 15:37:35 -0500 Derrick Stolee <stolee@xxxxxxxxx> wrote: > | Command | Before | After | Rel % | > |----------------------------------|--------|--------|-------| > | log --oneline --topo-order -1000 | 5.9s | 0.7s | -88% | > | branch -vv | 0.42s | 0.27s | -35% | > | rev-list --all | 6.4s | 1.0s | -84% | > | rev-list --all --objects | 32.6s | 27.6s | -15% | Could we have a performance test (in t/perf) demonstrating this? > +static int check_commit_parents(struct commit *item, struct commit_graph *g, > + uint32_t pos, const unsigned char *commit_data) Document what this function does? Also, this function probably needs a better name. > +/* > + * Given a commit struct, try to fill the commit struct info, including: > + * 1. tree object > + * 2. date > + * 3. parents. > + * > + * Returns 1 if and only if the commit was found in the commit graph. > + * > + * See parse_commit_buffer() for the fallback after this call. > + */ > +int parse_commit_in_graph(struct commit *item) > +{ The documentation above duplicates what's in the header file, so we can probably omit it. > +extern struct object_id *get_nth_commit_oid(struct commit_graph *g, > + uint32_t n, > + struct object_id *oid); This doesn't seem to be used elsewhere - do you plan for a future patch to use it?