Re: [PATCH] interpret_nth_last_branch(): avoid traversing the reflogs twice
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 18, 2009, 20:59 UTC
- Message-ID
- <alpine.DEB.1.00.0901182152010.3586@pacific.mpi-cbg.de>
- In-Reply-To
- <7vprilyt1w.fsf@gitster.siamese.dyndns.org>
Hi,
On Sat, 17 Jan 2009, Junio C Hamano wrote:
Show 19 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > Note: these are the memory requirements after some really unrealistically > > high activity, and the memory is free()d during parameter parsing. > > > > A much more realistical expectation would be to switch branches maybe 20 > > times a day, which would amount to something like 36 kilobyte. And again, > > they are free()d before the action really starts. > > My HEAD reflog is 7MB long with 39000 entries, and among them, 13100 > entries have "checkout: moving ". > > I know I will never want to switch back to the 10000th from the last > branch. I am quite sure that I would forget which branch I was on after > switching branches three or four times (hence my original hardcoded > limitation of 10 which "should be plenty"). When I know I only have to > keep track of 10 entries, having to keep track of 13100 entries, even if > it is 36kB (it would actually be 260kB in my case) feels there is > something wrong in the design.
Hrm. So let's leave it as a two-pass thing?
Ciao, Dscho