From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20765 invoked by alias); 21 Feb 2010 18:46:20 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27737 Received: (qmail 2592 invoked from network); 21 Feb 2010 18:46:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: pass (ns1.primenet.com.au: SPF record at ntlworld.com designates 81.103.221.33 as permitted sender) Date: Sun, 21 Feb 2010 18:34:45 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Hugh number of file descriptor checks Message-ID: <20100221183445.2a67d2c9@pws-pc> In-Reply-To: <100221091152.ZM24040@torch.brasslantern.com> References: <201002190000.27806.joke@seiken.de> <20100219022710.GA71015@redoubt.spodhuis.org> <201002191045.o1JAjlgg014360@news01.csr.com> <100221091152.ZM24040@torch.brasslantern.com> X-Mailer: Claws Mail 3.7.4 (GTK+ 2.18.6; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=ZtHxNT4mZm3rCuM0SmWmgWxeBwJsziC8EqOrwwVkrhA= c=1 sm=0 a=N4lGURQD3JAA:10 a=q2GGsy2AAAAA:8 a=NLZqzBF-AAAA:8 a=5UXZy-2KNidlkkkPczkA:9 a=AQxAzSPvdylh2v3d4uAA:7 a=dNGOrtSxL7_f-Psm7_Yrp3F61K0A:4 a=I6wTmPyJxzYA:10 a=_dQi-Dcv4p4A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 On Sun, 21 Feb 2010 09:11:52 -0800 Bart Schaefer 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 Web page now at http://homepage.ntlworld.com/p.w.stephenson/