delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/05/24/02:02:51

Date: Thu, 24 May 2001 08:45:50 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Laurynas Biveinis <lauras AT softhome DOT net>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Add d_type member to struct dirent
In-Reply-To: <20010523210505.A478@lauras.lt>
Message-ID: <Pine.SUN.3.91.1010524084349.17472E-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 23 May 2001, Laurynas Biveinis wrote:

> > If so, then this is exactly what I wanted to avoid: opening a file and
> > reading its first chunk will slow down readdir tremendously.  It is
> > IMHO unreasonable to punish all programs which use readdir to such a
> > great extent.
> 
> ...but in 99.9% cases __internal_readlink() will call just filelength()
> to check for 510 bytes magic size. No open() at all in this case, and plain
> filelength() is cheaper that stat(), isn't it?

??? I don't have the latest CVS sources handy where I type this, but IIRC 
filelength takes a handle, so __internal_readlink needs to open the file, 
before it knows that it's 510 byte long.

- Raw text -


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