delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/30/03:27:41

From: skb AT xmission DOT removethis DOT com (Scott Brown)
Newsgroups: comp.os.msdos.djgpp
Subject: Reading directories, readdir/stat too slow
Date: Thu, 30 Sep 1999 06:57:15 GMT
Organization: (none)
Lines: 12
Message-ID: <37f307e1.967161774@news.xmission.com>
NNTP-Posting-Host: slc1140.modem.xmission.com
X-Trace: news.xmission.com 938674598 24474 166.70.8.124 (30 Sep 1999 06:56:38 GMT)
X-Complaints-To: abuse AT xmission DOT com
NNTP-Posting-Date: 30 Sep 1999 06:56:38 GMT
X-Newsreader: Forte Free Agent 1.11/32.235
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

For the last little while, I've been avoiding findfirst/findnext when
I need to read directories, preferring the opendir functions instead
because they make certain things a lot simpler.

Unfortunately, I find that opendir/readdir, when combined with a stat
call (to get file mode/size/etc) is a *lot* slower than findfirst,
taking on the order of 70-100 times longer to perform the same work.
When running against tens of thousands of files in hundreds of
directories, it is a significant problem.

Is there any way to speed things up?

- Raw text -


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