zsh-workers
 help / color / mirror / code / Atom feed
From: Dan Nelson <dnelson@emsphone.com>
To: Nik Gervae <nik@pdi.com>, zsh-workers@math.gatech.edu
Subject: Re: System calls in zsh
Date: Thu, 23 Apr 1998 15:46:13 -0500	[thread overview]
Message-ID: <19980423154613.A1788@emsphone.com> (raw)
In-Reply-To: <199804231945.MAA07509@wank.pdi.com>; from "Nik Gervae" on Thu Apr 23 12:45:23 GMT 1998

In the last episode (Apr 23), Nik Gervae said:
> Hello. I've been using zsh 3.0.0 on IRIX for a while here at work,
> and we just started an evaluation of shell script efficiency that
> prompted me to ask this. It seems that if you create an empty zsh
> script and run it, it invokes these system calls (which I got using
> "par -s -S"):
> 
> exit             : 1 times
> read             : 12 times
> open             : 12 times
> close            : 11 times
[etc]
> Can anyone explain why read() and open() are called so many times for
> an empty shell script? The Bourne and Korn shells here invoke them
> twice each. zsh seems to be expending a bit more effort here than
> might be necessary.

Check to see which files are being opened and read.  On FreeBSD, a 
zsh -f -c '' opens the following:
/var/run/dev.db, /dev/tty, /etc/pwd.db, /etc/zshenv, /dev/null, and
takes .02 seconds from exec() to exit().

If you forgot to put a -f on your zsh commandline, it's probably
reading your zprofile, zshrc, zshenv, and zshrc files.


      parent reply	other threads:[~1998-04-23 20:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-23 19:45 Nik Gervae
1998-04-23 20:01 ` Mirar
1998-04-23 20:46 ` Dan Nelson [this message]

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=19980423154613.A1788@emsphone.com \
    --to=dnelson@emsphone.com \
    --cc=nik@pdi.com \
    --cc=zsh-workers@math.gatech.edu \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).