Re: [RFC/PATCH 1/5] gettext: fix bug in git-sh-i18n's eval_gettext() by using envsubst(1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 9, 2010 at 13:22, Johannes Sixt <j.sixt@xxxxxxxxxxxxx> wrote:
> Am 11/9/2010 12:57, schrieb Ãvar ArnfjÃrà Bjarmason:
>> How about if you just replace your tests with "cat". That should give
>> a more accurate indication of what speed it *should* be operating at,
>> once I fix those Makefile issues.
>
> Just FYI:
>
> $ time (for i in {1..100}; do eval_gettext2 foobar; done) > /dev/null
>
> real  Â0m14.844s
> user  Â0m11.635s
> sys   0m4.372s
>
> Please understand that on Windows there is a difference between cat, sed,
> etc. and git. There is also a speed difference, which is annoying, but it
> is fact and *not* a bug. You cannot argue with how the timings "should be".

I don't know/use Windows, or Git on Windows. So forgive my ignorance.

I understood your previous comments to mean that the invocation time
of git-* on one hand and cat(1) on the other hand had to do with how
many DLL's the former needed.

Since git-sh-i18n--envsubst needs the same DLL's (i.e. the libc) as
cat(1) and *nothing else* it should be as fast as cat(1) and not as
slow as git-*(1) once I fix that unfortunate Makefile bug, right?

Or is it something to do with the built-in MinGW tools being special
in some way (e.g. preloaded?)? In that case benchmarking a
hello-world.c for a git-sh-i18n--envsubst (or fixing the linking of
git-sh-i18n--envsubst) would make for a better comparison.

>> Anyway, if it's no more expensive than cat(1) (which it shouldn't be)
>> it probably won't be a problem to use git-sh-i18n--envsubst.
>
> It *is* more expensive.
>
> BTW, current ab/i18n fails to compile when NO_GETTEXT is specified in
> config.mak and libintl.h is not available. I suggest the fix below.

We already discussed this back in August. I came up with what I
thought was a more elegant solution, but didn't implement it yet:
http://www.spinics.net/lists/git/msg137783.html

I can try to come up with one (next weekend or something) and CC it to
you for testing.

> diff --git a/Makefile b/Makefile
> index c55baa6..e9ee142 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -619,9 +619,6 @@ LIB_OBJS += entry.o
> ÂLIB_OBJS += environment.o
> ÂLIB_OBJS += exec_cmd.o
> ÂLIB_OBJS += fsck.o
> -ifndef NO_GETTEXT
> -LIB_OBJS += gettext.o
> -endif
> ÂLIB_OBJS += graph.o
> ÂLIB_OBJS += grep.o
> ÂLIB_OBJS += hash.o
> @@ -1539,7 +1536,8 @@ endif
>
> Âifdef NO_GETTEXT
> Â Â Â ÂCOMPAT_CFLAGS += -DNO_GETTEXT
> -endif
> +else
> + Â Â Â LIB_OBJS += gettext.o
>
> Âifdef NEEDS_LIBINTL
> Â Â Â ÂEXTLIBS += -lintl
> @@ -1552,6 +1550,7 @@ endif
> Âifdef GETTEXT_POISON
> Â Â Â ÂCOMPAT_CFLAGS += -DGETTEXT_POISON
> Âendif
> +endif
>
> Âifeq ($(TCLTK_PATH),)
> ÂNO_TCLTK=NoThanks
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]