delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/28/07:01:35

Date: Sun, 28 Jan 1996 13:55:32 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Michael Phelps <morphine AT hops DOT cs DOT jhu DOT edu>
Cc: djgpp AT delorie DOT com
Subject: Re: findnext() question

On Fri, 26 Jan 1996, Michael Phelps wrote:

> 	I have a program that uses the findfirst()/findnext() construct 
> to read in filenames to be processed.  I have noticed, however, that for 
> one particular directory I have (which contains around 279 files), when 
> the program gets about halfway through the files, it slows down 
> substantially.  I have two questions about this:
> 	1)  Why does this happen?

This might be something totally unrelated to DJGPP.  Your system might be 
set up in a way that DOS exhausts its memory resources where it caches 
disk accesses.  Another cause might be that the directory (which is 
itself a special kind of file on the disk) is fragmented.

> 	2)  Is there a workaround which allows maximum speed through all 
> 	    the files?

	a) Defrag the disk.
	b) Install a software disk cache (like SmartDrv).
	c) If b) isn't an option (not enough free RAM), enlarge BUFFERS=,
FILES= and FCBS= settings on your CONFIG.SYS file.

- Raw text -


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