git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Build in gettext poison feature unconditionally

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 21, 2012, 16:37 UTC
Message-ID
<7va9xofbgo.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120821052404.GB55686@mannheim-rule.local>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 13 quoted lines
> Nguyễn Thái Ngọc Duy wrote:
>
>> The runtime cost should be small. "gcc -O2" inlines _() and
>> use_gettext_poison(). But even if it does not, performance should not
>> be impacted as _() calls are usually not on critical path. If some of
>> them are, we better fix there as gettext() may or may not be cheap
>> anyway.
>
> That seems reasonable to me.  The increase in code size of a commonly
> inlined function and the extra "if" in a common if not
> performance-critical codepath is annoying (and I'd prefer to keep
> use_gettext_poison() un-inlined), but in any event the cost would go
> away once the translation-based implementation of poison lands.

I would say it is not worse than just "annoying"; if the cost will go away, I'd rather see this conversion postponed and is done as part of (and preferrably at the end of) the "poison with a poison-locale" series.

> Yes, that would be nice (or perhaps a mode to run most tests in
> the current locale and rerun test assertions that use a test_i18n*
> helper or C_LOCALE_OUTPUT prerequisite in the C locale).

Yeah, I think that is the right direction to go; I suspect that "poison with a poison-locale" would have to be ready to allow us to go there, though.

Previous: Jonathan NiederNext: Nguyễn Thái Ngọc Duy
Message 3 of 10 in “Build in gettext poison feature unconditionally”
  1. Build in gettext poison feature unconditionallyNguyễn Thái Ngọc Duy, Aug 21, 2012
  2. Jonathan NiederAug 21, 2012
  3. Junio C HamanoAug 21, 2012
  4. Support generate poison .mo files for testingNguyễn Thái Ngọc Duy, Aug 22, 2012
  5. Junio C HamanoAug 22, 2012
  6. Nguyen Thai Ngoc DuyAug 22, 2012
  7. Junio C HamanoAug 22, 2012
  8. Nguyen Thai Ngoc DuyAug 23, 2012
  9. Junio C HamanoAug 22, 2012
  10. Nguyen Thai Ngoc DuyAug 23, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.