zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: Hugh number of file descriptor checks
Date: Sun, 21 Feb 2010 18:34:45 +0000	[thread overview]
Message-ID: <20100221183445.2a67d2c9@pws-pc> (raw)
In-Reply-To: <100221091152.ZM24040@torch.brasslantern.com>

On Sun, 21 Feb 2010 09:11:52 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> Sorry to be a bit late responding to this, I was traveling ...
> 
> On Feb 19, 10:45am, Peter Stephenson wrote:
> } 
> } How about the following?  I also tried to tidy up the rellocation of
> } fdtable a bit.
> } 
> }  /**/
> }  mod_export long
> }  zopenmax(void)
> }  {
> } -    static long openmax = 0;
> } +    long openmax = 0;
> }  
> }      if (openmax < 1) {
> 
> Did you really mean to remove "static" there?

Yes.

>  With that removed, the
> "if (openmax < 1)" will ALWAYS be true, so there's no point in testing
> it 

You're right, that can go.

> -- but the intention of having openmax be static was so that once
> it's determined, we know what it is and never probe it again.
> 
> That is, on certain platforms I think you've traded startup-time
> inefficiency for later run-time inefficiency.

It should now only ever be called at initialisation, since I've removed
the only other call to it (unless you can see otherwise).

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


  reply	other threads:[~2010-02-21 18:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201002190000.27806.joke@seiken.de>
     [not found] ` <20100219022710.GA71015@redoubt.spodhuis.org>
2010-02-19 10:45   ` Peter Stephenson
2010-02-21  1:47     ` Phil Pennock
2010-02-21 17:11     ` Bart Schaefer
2010-02-21 18:34       ` Peter Stephenson [this message]
2010-02-21 21:03         ` Bart Schaefer

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=20100221183445.2a67d2c9@pws-pc \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.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.
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).