On Wed, Mar 02, 2016 at 01:00:38AM -0800, Junio C Hamano wrote: > Jeff King <peff@xxxxxxxx> writes: > > > I do find it hard to believe that the bundle code had to invent its own > > ref storage data structure, and couldn't just use "struct ref" like all > > of the other code. It doesn't look like we ever sort it or do > > non-sequential access. The linked-list "struct ref" probably would have > > been fine. > > > > Not a problem you are introducing, of course, but if you are touching > > this code a lot, it might be worth seeing how painful it is. > > The bundle code being fairly old, I actually wouldn't be surprised > if it predated the wide use of "struct ref" ;-) > > It is not performance critical to add entries to the list of > prerequisites or references (i.e. it is OK to have these as linear > lists, not linked lists of "struct ref"), and these lists do not > have to be ultra-efficient in their storage use (i.e. it is OK to > replace these with "struct ref" linked lists), so we could go either > way. It's not like we would be using a lot of helper functions we > already have for "struct ref" in this code, so I'm inclined to give > a very low priority to the task of rethinking this data structure. Sure, I agree it's low priority by itself. It was more something to consider if you find that you are touching the bundle code a lot. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html