Re: [PATCH v3 11/14] commit: integrate commit graph with commit parsing
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Feb 14, 2018, 00:12 UTC
- Message-ID
- <20180213161225.6e21291d25015be632b03fee@google.com>
- In-Reply-To
- <1518122258-157281-12-git-send-email-dstolee@microsoft.com>
On Thu, 8 Feb 2018 15:37:35 -0500 Derrick Stolee <stolee@gmail.com> wrote:
Show 6 quoted lines
> | 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.
Show 12 quoted lines
> +/*
> + * 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?