Re: [RFC PATCH] packfile: iterate packed objects in pack order

2018-08-10 Thread Jeff King
On Thu, Aug 09, 2018 at 03:03:24PM -0700, Jonathan Tan wrote: > On Wed, Aug 8, 2018 at 4:25 PM, Jeff King wrote: > > Even if you just use the oid to do a separate lookup in the object > > database, there's still a benefit in accessing the objects in pack > > order. > > You're probably right,

Re: [RFC PATCH] packfile: iterate packed objects in pack order

2018-08-09 Thread Jonathan Tan
On Wed, Aug 8, 2018 at 4:25 PM, Jeff King wrote: > Even if you just use the oid to do a separate lookup in the object > database, there's still a benefit in accessing the objects in pack > order. You're probably right, but I don't immediately see what the benefit is. On a not completely

Re: [RFC PATCH] packfile: iterate packed objects in pack order

2018-08-08 Thread Jeff King
On Wed, Aug 08, 2018 at 04:12:10PM -0700, Jonathan Tan wrote: > Many invocations of for_each_object_in_pack() and > for_each_packed_object() (which invokes the former) subsequently check > at least the type of the packed object, necessitating accessing the > packfile itself. For locality reasons,

[RFC PATCH] packfile: iterate packed objects in pack order

2018-08-08 Thread Jonathan Tan
Many invocations of for_each_object_in_pack() and for_each_packed_object() (which invokes the former) subsequently check at least the type of the packed object, necessitating accessing the packfile itself. For locality reasons, it is thus better to iterate in pack order, instead of index order.