git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marco Costalba" <mcostalba@gmail.com>
To: "Alex Riesen" <raa.lkml@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: Easy shell question: how to make a script killing all his childs when killed?
Date: Sun, 10 Dec 2006 00:06:34 +0100	[thread overview]
Message-ID: <e5bfff550612091506g41e40e87n6356b8ddd5e16a5d@mail.gmail.com> (raw)
In-Reply-To: <20061209213937.GB12373@steel.home>

On 12/9/06, Alex Riesen <fork0@t-online.de> wrote:
>
> Why do you need to save it in temporary file at all? Why don't you
> read the output like gitk does?  You can take a look at popen(3). It's
> known to be portable among operating systems and libc's.  Or, BTW, why
> don't you just read qprocess.h, use processIdentifier()/pid(),
> read*()-methods and the like?  (though, looking at the QProcess in
> qt3, I wouldn't really blame you)
>

Well, I _used_ QProcess interface until last week. It's socket based
and it's quite fast (much more then gitk BTW), but due to some
internal buffering not so fast as reading from a file (in my last post
regarding git-rev-list access there are some performance numbers to
document this). It seems that socket/pipe based IPC is not as fast as
file write/read. Of course we are talking of OS cached files, no disk
access must be involved to keep the speed.

Probably someone more versed in IPC and OS internals could comment on
this, I just base my arguments on experimental testing of various IPC
systems without going deep in the reasons why the number are like
this, also because I don't have the necessary knowledge.

But the fact is that with temporary (in memory) data exchange file the
load time has been reduced by 40% against socket based QProcess
interface.

Regarding gitk we are at least one order of magnitude faster both with
QProcess and, more, with temporary files, so it's not a useful
reference in this case.

  Marco

P.S: I didn't experiment with popen(). Thanks for the hint, I will

  reply	other threads:[~2006-12-09 23:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-09 15:16 Easy shell question: how to make a script killing all his childs when killed? Marco Costalba
2006-12-09 17:37 ` Alex Riesen
2006-12-09 17:51   ` Marco Costalba
2006-12-09 21:39     ` Alex Riesen
2006-12-09 23:06       ` Marco Costalba [this message]
2006-12-10 14:25         ` Alex Riesen

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=e5bfff550612091506g41e40e87n6356b8ddd5e16a5d@mail.gmail.com \
    --to=mcostalba@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=raa.lkml@gmail.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).