All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Junio C Hamano <junkio@cox.net>
Cc: Qingning Huo <qhuo@mayhq.org>, git@vger.kernel.org
Subject: Re: [PATCH] Invoke git-repo-config directly.
Date: Thu, 16 Mar 2006 12:55:55 +0100	[thread overview]
Message-ID: <4419524B.1030405@op5.se> (raw)
In-Reply-To: <7vmzfq8zmr.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> 
> And the second issue is the last point in the "implications"
> list above.  You are right, and I stand corrected.  Our scripts
> should consistently use dash form.
> 
> One thing that bothers me is that we need to keep encouraging
> users to use dashless form from the command line, while we
> update our scripts to use dash form.  What a contradicting and
> confusing situation X-<.
> 

One of the two reasons for rewriting the git wrapper in C was the 
performance penalty that came from having it as a shell-script while it 
was desirable from a porcelainish standpoint to use the dash-less form 
since we thought even then that "git" would always be in PATH while 
"git-foo" was to be moved to the still-imaginary GIT_EXEC_PATH.

The prepending of the GIT_EXEC_PATH to PATH was a laziness workaround 
for scripts that use the dashed form until we'd had time to change 
those, although I see from the commit-message that it's a far cry from 
abundantly clear (reading it now I even think it's clear I meant the 
other way around, although I remember I didn't). Anyways, the relative 
parts are these, from commit 8e49d50388211a0f3e7286f6ee600bf7736f4814

---8<---8<---8<---
     The location of the GIT_EXEC_PATH (name discussion's closed,
     thank gods) can be obtained by running

     	git --exec-path

     which will hopefully give porcelainistas ample time to adapt their
     heavy-duty loops to call the core programs directly and thus save
     the extra fork() / execve() overhead, although that's not really
     necessary any more.

     The --exec-path value is prepended to $PATH, so the git-* programs
     should Just Work without ever requiring any changes to how they call
     other programs in the suite.

     Some timing values for 10000 invocations of git-var >&/dev/null:
     	git.sh: 24.194s
     	git.c:   9.044s
     	git-var: 7.377s

---8<---8<---8<---

 From the timing values there I think the performance issues of using 
the dash-less form can just be ignored. Very rarely will a porcelainish 
wrapper do 10000 invocations of git commands where less than 2 seconds 
will be a large percentage of the overall runtime.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

  reply	other threads:[~2006-03-16 11:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-14 21:10 [PATCH] Invoke git-repo-config directly Qingning Huo
2006-03-14 21:20 ` Johannes Schindelin
2006-03-14 21:30   ` Qingning Huo
2006-03-14 21:58 ` Linus Torvalds
2006-03-14 22:40   ` Qingning Huo
2006-03-14 23:07     ` Linus Torvalds
2006-03-15 20:40       ` Qingning Huo
2006-03-15 21:33       ` Junio C Hamano
2006-03-15 21:35         ` Junio C Hamano
2006-03-15 22:11           ` Qingning Huo
2006-03-15 22:51         ` Linus Torvalds
2006-03-15 23:35           ` Junio C Hamano
2006-03-16  7:53             ` Qingning Huo
2006-03-16  7:57               ` Junio C Hamano
2006-03-16  8:26               ` Junio C Hamano
2006-03-16 12:53                 ` Mark Wooding
2006-03-16 13:53                   ` Andreas Ericsson
2006-03-17  2:10                     ` Junio C Hamano
2006-03-17 10:51                       ` Mark Wooding
2006-03-16 14:27                   ` Timo Hirvonen
2006-03-16 14:39                     ` Andreas Ericsson
2006-03-16 20:33                 ` Qingning Huo
2006-03-16 10:14               ` Junio C Hamano
2006-03-16 11:55                 ` Andreas Ericsson [this message]
2006-03-16 19:27                 ` Jon Loeliger
2006-03-16 19:32                   ` Jon Loeliger
2006-03-16  6:37           ` Junio C Hamano

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=4419524B.1030405@op5.se \
    --to=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=qhuo@mayhq.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.