Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Hugh number of file descriptor checks



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?  With that removed, the
"if (openmax < 1)" will ALWAYS be true, so there's no point in testing
it -- 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.



Messages sorted by: Reverse Date, Date, Thread, Author