Date: Thu, 24 May 2001 08:45:50 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Laurynas Biveinis 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.