delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/12/31/12:30:14

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: _djstat_flags
Date: 31 Dec 2004 17:16:27 GMT
Lines: 22
Message-ID: <33lfrbF407fcrU2@news.dfncis.de>
References: <020501c4ef4d$f9b363a0$0600000a AT broadpark DOT no>
X-Trace: news.dfncis.de bner4blXdT6gOcYCpTSzMgI50wfUQpUg94rw3CUb327GVNiBInVcpB4emX
X-Orig-Path: not-for-mail
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Gisle Vanem <giva AT bgnett DOT no> wrote:
> In programs that uses stat() heavily, it seems a huge amount of CPU
> cycles is wasted in _is_executable(). If I do:
>  _djstat_flags |= _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;

> the speed increase is tremendous. Since most program use f?stat()
> as-is, I which there was a environment variable that would do the same as
> above.

The expressions "most programs" and "set an environment variable" are
in direct contradiction to each other.  If a program needs this
speedup, it's the responsibility of the person porting the program to
enable it after checking that it doesn't do any harm.  Restricting the
feature set supported by DJGPP's fstat() implementation for *all*
programs would be almost guaranteed to cause more harm than good.

For all other programs, this feature falls under the good old "no
user-serviceable parts inside" clause.

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019