Slow DIR cmd on large mem stick

The intent of this forum is to discuss my DOS TSR programs (available at http://bretjohnson.us), how they work and don't work, new/missing features, status of updates, and anything else related to them that may need to be discussed.

Slow DIR cmd on large mem stick

Postby Franko » Fri Nov 01, 2013 3:56 am

Does anybody know how to speed up the DIR command (using DOS7, USBUHCIL, USBDRIVE) on large capacity USB mem sticks?
I had the 1G stick (2.0) and DIR cmd responds in a second even if stick is filled with great number of files.
Tried with 4G stick, containing three files only, and the DIR needs from 8 to 20 seconds for output been displayed. I configured the stick in different partitioning modes: 1st partition FAT32 (80MB, 1G, full capacity), the remained part: left unpartitioned or FAT32 or NTFS. The results are in the above mentioned 8 to 20 secs.
It's difficult (or impossible) today find low capacity memory sticks.
Believe (but don't know how) it must be possible to hide the mem portion of stick over 1G.
Help pls.
Franko.
Franko
 
Posts: 5
Joined: Tue Nov 27, 2012 10:13 pm

Re: Slow DIR cmd on large mem stick

Postby Bret » Mon Nov 04, 2013 7:36 am

There is no way I know of to speed things up for the first DIR command, though the second time you do it should be much faster. Using a cache makes it even faster.

The DIR command has to download the entire FAT (several sectors worth) to be able to determine the amount of free space on the disk (the last thing displayed int he DIR command). It doesn't matter how many files there are -- it takes the same amount of time no matter what. The DIR command doesn't look at the unpartitioned part of the disk anyway, so there's no need to try and "hide" it. The slow speed is probably just related to how the disk is manufactured, or how it's formatted, not necessarily how big it is.

You could try using FAT16 instead of FAT32, which could be faster in you particular situation.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: Slow DIR cmd on large mem stick

Postby Franko » Tue Nov 05, 2013 2:14 am

Thank you Bret,
I agree there must be something in manufacturing procedure, because even the 1st partition is set to only 80MB, the file access (and DIR cmd too) is very slow.
I posted the question to assure myself there is no any tip-and-trick to override the problem.
Best regards.
Franko
 
Posts: 5
Joined: Tue Nov 27, 2012 10:13 pm


Return to Programs

Who is online

Users browsing this forum: No registered users and 3 guests

cron