git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: kusmabite@gmail.com
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, msysGit <msysgit@googlegroups.com>
Subject: Re: What's cooking in git.git (Feb 2011, #05; Wed, 23)
Date: Thu, 24 Feb 2011 18:47:53 +0100	[thread overview]
Message-ID: <AANLkTike1qDGJ-mLsSRYpBk59_evk9x5oFeGt5RSUg3d@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimWy+W+rcZHsac_n--y9iMeaoO66CPZVbN1VBp2@mail.gmail.com>

On Thu, Feb 24, 2011 at 10:45, Erik Faye-Lund <kusmabite@gmail.com> wrote:
> On Thu, Feb 24, 2011 at 1:32 AM, Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
>> And then there's the issue that unlike the C patches these will not be
>> a no-op that'll be optimized away by the compiler. We'll be calling an
>> external program for displaying messages. While this is a trivial cost
>> on Unix (especially in the context we're using it, i.e. not in tight
>> loops) it's more expensive on Windows.
>>
>
> Ouch. I remember this being brought up earlier, but I just assumed it
> had been fixed somehow. The shell-scripts are already pretty slow on
> Windows, and the overhead of starting a new process here is quite
> significant.
>
> It sounds to me like we should revert these patches in msysGit, at
> least until there's some actual translations in place (and that time
> actually goes into something useful)...

IIRC last time this was discussed I asked whether the size of the
binary mattered for execution startup time (i.e. more so than on
Unix). We're only invoking printf(1) and git-sh-i18n--envsubst, both
of which only are (or only need to be) linked to libc.

It would also be interesting to have some real world benchmarks on
Windows with and without this series, maybe it won't be so bad.

I think in the long term we probably want to rewrite the remaining
*.sh programs in C anyway.

>> I don't see any way to deal with that short of implementing some
>> pre-processor, but I think the cost is worth it, but others might
>> disagree of course.
>>
>
> I'm not so sure. This is mostly a problem with the no-op version on
> Windows (due to the slow process-startup there), but I think Git for
> Windows probably wants to have i18n support in it's distribution as it
> strives to be the canonical Git-distribution for Windows. But if we
> do, there's nothing to optimize. There's no no-op-stuff, and we need
> to spend that time getting translations.
>
> It might be that some people that build Git for Windows themselves and
> know that they don't want a translated Git could benefit from a
> pre-processor, but I'm not so sure. Translated strings occur when
> there's communication going on between Git and the user, and then
> we're some times waiting for user-input, and even when we aren't it
> should be relatively few messages (unless verbose flags are turned on,
> which isn't an important use-case performance-wise to me).
>
>> Anyway, I can submit these patches (around 53) real soon, or wait
>> until the current series settles. It's the same to me, which would you
>> prefer?
>>
>
> If we're going to revert these patches in 4msysgit.git, then I can
> imagine that the process becomes very awkward and error-prone if we're
> going to diverge for a long time. So I think it'd make more sense for
> us (the msysgit-developers, that is) if it was merged together with
> the first translations. But that might be sub-optimal for the rest of
> you guys.

If it comes to that it'll be easier to have some perl script that
converts C<"$(eval_gettext "foobar: \$whatever")"> back to C<"foobar:
$whataver"> at build time than revert the patches.

  reply	other threads:[~2011-02-24 17:48 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23 23:26 What's cooking in git.git (Feb 2011, #05; Wed, 23) Junio C Hamano
2011-02-23 23:48 ` ab/i18n (What's cooking in git.git (Feb 2011, #05; Wed, 23)) Jonathan Nieder
2011-02-24  1:16   ` Junio C Hamano
2011-02-24  2:55     ` Ævar Arnfjörð Bjarmason
2011-02-24  3:14       ` Jonathan Nieder
2011-02-24 10:38         ` Ævar Arnfjörð Bjarmason
2011-02-24 10:45           ` Jonathan Nieder
2011-02-24 11:00           ` Jonathan Nieder
2011-02-25 21:48             ` Ævar Arnfjörð Bjarmason
2011-02-26  5:14               ` Jonathan Nieder
2011-02-24  4:00       ` ab/i18n Jonathan Nieder
2011-02-24  9:56   ` ab/i18n (What's cooking in git.git (Feb 2011, #05; Wed, 23)) Erik Faye-Lund
2011-02-24 10:27     ` ab/i18n Jonathan Nieder
2011-02-24 19:11       ` ab/i18n Junio C Hamano
2011-02-24 10:40     ` ab/i18n (What's cooking in git.git (Feb 2011, #05; Wed, 23)) Ævar Arnfjörð Bjarmason
2011-02-23 23:52 ` What's cooking in git.git (Feb 2011, #05; Wed, 23) Johan Herland
2011-02-24  0:43   ` Junio C Hamano
2011-02-24  1:04     ` Johan Herland
2011-02-24  0:32 ` Ævar Arnfjörð Bjarmason
2011-02-24  0:57   ` Junio C Hamano
2011-02-24  1:37     ` Ævar Arnfjörð Bjarmason
2011-02-24  1:59       ` Junio C Hamano
2011-02-24  2:07         ` Ævar Arnfjörð Bjarmason
2011-02-24  9:45   ` Erik Faye-Lund
2011-02-24 17:47     ` Ævar Arnfjörð Bjarmason [this message]
2011-02-24 22:39       ` Jonathan Nieder
2011-02-25  1:45       ` [msysGit] " Johannes Schindelin
2011-02-25  9:05     ` Kirill Smelkov
2011-02-25 11:11       ` Johannes Schindelin
2011-02-25 19:24         ` Kirill Smelkov
2011-02-25 21:54           ` Johannes Schindelin
2011-02-26 11:07             ` Kirill Smelkov
2011-02-26 19:07               ` Kirill Smelkov
2011-02-26 19:58                 ` cross-compiling msys-1.0.dll, was " Johannes Schindelin
2011-03-12 13:18                   ` Kirill Smelkov
2011-03-12 15:38                     ` Johannes Schindelin
2011-02-27 14:28               ` Johannes Schindelin
2011-03-12 13:16                 ` Kirill Smelkov
2011-02-26 10:24 ` Adding Beyond Compare as a merge tool, was: " Sebastian Schuberth
2011-02-26 10:33   ` Junio C Hamano
2011-02-26 10:48     ` Sebastian Schuberth
2011-02-27  5:38   ` Chris Packham
2011-02-27  9:09     ` Junio C Hamano
2011-02-27 10:58       ` Sebastian Schuberth
2011-02-27 10:57     ` Sebastian Schuberth
2011-02-27 11:15       ` Sebastian Schuberth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTike1qDGJ-mLsSRYpBk59_evk9x5oFeGt5RSUg3d@mail.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kusmabite@gmail.com \
    --cc=msysgit@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).