Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] macos: lazily initialize iconv

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:23

Junio C Hamano [off-list ref] 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 <redacted>
---

 * 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help