Re: [PATCH 1/5] trailer: use singly-linked list, not doubly
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 12, 2016, 06:24 UTC
- Message-ID
- <xmqqmvia5bkf.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <8e12e0954f0a23d7c7905c58a3f7d8084d9338be.1476232683.git.jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 10 quoted lines
> Use singly-linked lists (instead of doubly-linked lists) in trailer to > keep track of arguments (whether implicit from configuration or explicit > from the command line) and trailer items. > > This change significantly reduces the code length and simplifies the code. > There are now fewer pointers to be manipulated, but most trailer > manipulations now require seeking from beginning to end, so there might > be a slight net decrease in performance; however the number of trailers > is usually small (10 to 15 at the most) so this should not cause a big > impact.
It is overall a very good change, but can you split this into two independent patches? s/struct trailer_item/const &/ sprinkled all over the place is more or less unrelated change and it is very distracting to see the primary change of the way lists are handled.