Re: [PATCH v3] unpack-trees: avoid duplicate ODB lookups during checkout

2017-04-14 Thread Jeff Hostetler
On 4/13/2017 8:59 PM, Jeff King wrote: On Thu, Apr 13, 2017 at 04:11:31PM -0700, Junio C Hamano wrote: g...@jeffhostetler.com writes: + /* +* Fetch the tree from the ODB for each peer directory in the +* n commits. +* +* For 2- and 3-way traversals, we

Re: [PATCH v3] unpack-trees: avoid duplicate ODB lookups during checkout

2017-04-13 Thread Jeff King
On Thu, Apr 13, 2017 at 04:11:31PM -0700, Junio C Hamano wrote: > g...@jeffhostetler.com writes: > > > + /* > > +* Fetch the tree from the ODB for each peer directory in the > > +* n commits. > > +* > > +* For 2- and 3-way traversals, we try to avoid hitting the > > +* ODB

Re: [PATCH v3] unpack-trees: avoid duplicate ODB lookups during checkout

2017-04-13 Thread Junio C Hamano
g...@jeffhostetler.com writes: > + /* > + * Fetch the tree from the ODB for each peer directory in the > + * n commits. > + * > + * For 2- and 3-way traversals, we try to avoid hitting the > + * ODB twice for the same OID. This should yield a nice speed > + * up

[PATCH v3] unpack-trees: avoid duplicate ODB lookups during checkout

2017-04-13 Thread git
From: Jeff Hostetler Version 3 uses a structure copy rather than memcpy and adds a comment. Jeff Hostetler (1): unpack-trees: avoid duplicate ODB lookups during checkout unpack-trees.c | 37 + 1 file changed, 33 insertions(+), 4

[PATCH v3] unpack-trees: avoid duplicate ODB lookups during checkout

2017-04-13 Thread git
From: Jeff Hostetler Teach traverse_trees_recursive() to not do redundant ODB lookups when both directories refer to the same OID. In operations such as read-tree and checkout, there will likely be many peer directories that have the same OID when the differences between