Re: [PATCH 2/3] prune: use bitmaps for reachability traversal

2019-04-18 Thread Jeff King
On Mon, Apr 15, 2019 at 11:00:45AM -0400, Derrick Stolee wrote: > > void mark_reachable_objects(struct rev_info *revs, int mark_reflog, > > timestamp_t mark_recent, struct progress *progress) > [...] > > cp.progress = progress; > > cp.count = 0; > > > > + bitma

Re: [PATCH 2/3] prune: use bitmaps for reachability traversal

2019-04-15 Thread Derrick Stolee
On 2/13/2019 11:37 PM, Jeff King wrote: > +static void *lookup_object_by_type(struct repository *r, > +const struct object_id *oid, > +enum object_type type) > +{ > + switch (type) { > + case OBJ_COMMIT: > + return

[PATCH 2/3] prune: use bitmaps for reachability traversal

2019-02-13 Thread Jeff King
Pruning generally has to traverse the whole commit graph in order to see which objects are reachable. This is the exact problem that reachability bitmaps were meant to solve, so let's use them (if they're available, of course). Here are timings on git.git: TestHEAD^