zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
To: "ZSH workers mailing list" <zsh-workers@sunsite.auc.dk>
Subject: Re: mapfile module - avoiding $(...) in completion functions
Date: Thu, 06 Jan 2000 20:19:39 +0000	[thread overview]
Message-ID: <E126JLp-0007J0-00.2000-01-06-20-17-41@cmailg7.svr.pol.co.uk> (raw)
In-Reply-To: ""Andrej Borsenkow""'s message of "Thu, 06 Jan 2000 10:32:54 +0300." <000401bf5818$3e881bb0$21c9ca95@mow.siemens.ru>

"Andrej Borsenkow" wrote:
> May be it was discussed already, but is not mapfile module alternative to
> $(...)? We mostly need it to parse files content, as in
> $(</etc/printcap), and in this case we could just as well mmap the file.

There's no real efficiency issue here --- $(<...) is handled without
forking, just by reading the file in, so while mapping may in principal be
quicker the gain is certainly negligible.

mapfile is supposed to do this, too, if it doesn't find enough memory
management tools, so it should be safe to use anyway.  However, it's not a
particularly good idea to keep requiring extra modules for completion to
work:  completion is a basic feature, and the modules are supposed to be
optional to avoid the overhead.  This is even worse, for obvious reasons,
if the shell is statically linked.

-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>


  reply	other threads:[~2000-01-06 20:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200001051437.PAA10986@beta.informatik.hu-berlin.de>
2000-01-06  7:32 ` Andrej Borsenkow
2000-01-06 20:19   ` Peter Stephenson [this message]
2000-01-06  9:45 Sven Wischnowsky

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=E126JLp-0007J0-00.2000-01-06-20-17-41@cmailg7.svr.pol.co.uk \
    --to=pws@pwstephenson.fsnet.co.uk \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).