Re: [PATCH] shortlog: skip format/parse roundtrip for internal traversal
- From
Jeff King <peff@peff.net>
- Date
- Sep 10, 2017, 08:50 UTC
- Message-ID
- <20170910085056.ovwlfjj3unxtmykc@sigill.intra.peff.net>
- In-Reply-To
- <0239ea26-199c-b39e-91a9-5ea5c470af8f@web.de>
On Sun, Sep 10, 2017 at 10:44:46AM +0200, René Scharfe wrote:
Show 14 quoted lines
> Am 08.09.2017 um 11:21 schrieb Jeff King: > > Note that the non-stdin path no longer looks at the "mailmap" entry of > > "struct shortlog" (instead we use the one cached inside pretty.c). But > > we still waste time loading it. I'm not sure if it's worth addressing > > that. It's only once per program invocation, and it's a little tricky to > > fix (we do shortlog_init() before we know whether or not we're using > > stdin). We could just load it lazily, though, which would cover the > > stdin case. > > The difference in performance and memory usage will only be measurable > with really big mailmap files. However, it may be an opportunity for > simplifying the mailmap API in general. Conceptually the map data > should fit into struct repository instead of being read and stored by > each user, right?
Yes, I think it would be fine to have a single "the_mailmap", and in post-struct-repository world, that's where it should go.
-Peff