From: Junio C Hamano Date: Tue, 31 Jul 2012 18:07:04 GMT Subject: Re: [PATCH] macos: lazily initialize iconv Message-ID: <7va9yfkdo7.fsf@alter.siamese.dyndns.org> In-Reply-To: <7vk3xjked0.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: > In practice, the majority of paths do not have any utf8 character > that needs the canonicalization. Lazily call iconv_open() and > iconv_close() to avoid unnecessary overhead. > > Signed-off-by: Junio C Hamano > --- > > * This is not even compile tested, so it needs testing and > benchmarking, as I do not even know how costly the calls to > open/close are when we do not have to call iconv() itself. > > This was brought up by Linus (Cc'ed) in http://goo.gl/INWVc Even though I also think that per-DIR iconv may not be the optimal way to organize this (I think iconv_t should be a per-thread thing at most), it would be a more involved change that needs to be done by somebody who actually works on Mac, so the patch I sent is kept deliberately minimum. Just FYI.