Re: [PATCH 3/4] peel_ref: check object type before loading

2012-10-04 Thread Jeff King
On Thu, Oct 04, 2012 at 01:41:40PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > [1] One thing I've been toying is with "external alternates"; dumping > > your large objects in some realtively slow data store (e.g., a > > RESTful HTTP service). You could cache and cheaply query

Re: [PATCH 3/4] peel_ref: check object type before loading

2012-10-04 Thread Junio C Hamano
Jeff King writes: > [1] One thing I've been toying is with "external alternates"; dumping > your large objects in some realtively slow data store (e.g., a > RESTful HTTP service). You could cache and cheaply query a list of > "sha1 / size / type" for each object from the store, but ge

Re: [PATCH 3/4] peel_ref: check object type before loading

2012-10-04 Thread Jeff King
On Thu, Oct 04, 2012 at 12:06:16PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > The point of peel_ref is to dereference tags; if the base > > object is not a tag, then we can return early without even > > loading the object into memory. > > > > This patch accomplishes that by checking

Re: [PATCH 3/4] peel_ref: check object type before loading

2012-10-04 Thread Junio C Hamano
Jeff King writes: > The point of peel_ref is to dereference tags; if the base > object is not a tag, then we can return early without even > loading the object into memory. > > This patch accomplishes that by checking sha1_object_info > for the type. For a packed object, we can get away with just

[PATCH 3/4] peel_ref: check object type before loading

2012-10-04 Thread Jeff King
The point of peel_ref is to dereference tags; if the base object is not a tag, then we can return early without even loading the object into memory. This patch accomplishes that by checking sha1_object_info for the type. For a packed object, we can get away with just looking in the pack index. For