X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "one2001boy AT yahoo DOT com" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040514 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: latest ls.exe version in XP problem References: <6jKbd.13476$nj DOT 4016 AT newssvr13 DOT news DOT prodigy DOT com> <416fec3d AT news DOT upm DOT es> <01c4b377$Blat.v2.2.2$bd9427e0 AT zahav DOT net DOT il> <01c4b404$Blat.v2.2.2$848b3140 AT zahav DOT net DOT il> <01c4b54b$Blat.v2.2.2$224c0ac0 AT zahav DOT net DOT il> <01c4b72e$Blat.v2.2.2$159b62a0 AT zahav DOT net DOT il> <1k_dd.17187$nj DOT 2376 AT newssvr13 DOT news DOT prodigy DOT com> <01c4b8f5$Blat.v2.2.2$1443c320 AT zahav DOT net DOT il> In-Reply-To: <01c4b8f5$Blat.v2.2.2$1443c320@zahav.net.il> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 62 Message-ID: NNTP-Posting-Host: 69.104.56.233 X-Complaints-To: abuse AT prodigy DOT net X-Trace: newssvr13.news.prodigy.com 1098602824 ST000 69.104.56.233 (Sun, 24 Oct 2004 03:27:04 EDT) NNTP-Posting-Date: Sun, 24 Oct 2004 03:27:04 EDT Organization: SBC http://yahoo.sbc.com X-UserInfo1: FKPO AT MONEZVSSWLSX@]D]_\@VR]^@B AT MCPWZKB]MPXHDUWYAKVUOPCW[ML\JXUCKVFDYZKBMSFX^OMSAFNTINTDDMVW[X\THOPXZRVOCJTUTPC\_JSBVX\KAOTBAJBVMZTYAKMNLDI_MFDSSOLXINH__FS^\WQGHGI^C AT E[A_CF\AQLDQ\BTMPLDFNVUQ_VM Date: Sun, 24 Oct 2004 07:27:04 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: >>From: "one2001boy AT yahoo DOT com" >>Date: Fri, 22 Oct 2004 02:33:33 GMT >> >>under Windows XP in directory C:\windows\system32, I >>have 2558 File(s). >> >>run ls -F, I wait for 16 seconds, and then screen start to display >>the files and directories. > > > Can you tell how much time it takes on the same machine, and in the > same directory, to run "ls" (without the -F option)? It took 4 seconds to display all. The file starts to display right after you type dir. > > The reason I'm asking this is because on XP, whenever any DOS program > is run, Windows needs to start a DOS emulation, load and process the > AUTOEXEC.NT file, and do other time-consuming chores. That makes any > DJGPP program look generally sluggish on XP. > > >>The computer I am running is Pentium 4, 3.0 Ghz, with 512 Meg. > > > I tried this on a laptop with 993-MHz Pentium III and 256 MB of main > memory, running XP SP1a, and got the following responses: "ls -F" > starts displaying after 10 seconds when I run it on WINDOWS\SYSTEM32 > directory first time, and after only 3 seconds when I run it on the > same directory afterwards (because the directory contents is already > in the Windows disk cache). Right. > Just "ls" starts displaying after 1 > second. This system has 1844 files (including 41 subdirectories) in > its WINDOWS\SYSTEM32 directory. > > The same "ls -F" command on a 450-MHz box running Windows 98 (1151 > files in the WINDOWS\SYSTEM directory) takes 7 seconds. > > So it sounds like the CPU speed is not important here. What matters > is the file-system efficiency. > > Also, the fact that "ls -F" takes a while in such a huge directory is > not really news to me. We are lucky such directories are rare. I guess not all people will always use ls -F. > > Bottom line, I suggest to use "ls --color" to find out file > attributes. It is faster because it only looks at the files' > file-name extensions, but does not read the first few bytes to look > for the magic signature if the extension does not reveal the file's > type. That will miss a few rare executable files if the LS_COLORS > variable doesn't catch them. > This is a nice try. Thank you.