Subj : sweep To : Jonathan De Boyne Pollard From : Eddy Thilleman Date : Fri Aug 03 2001 12:40 am Hello Jonathan, Tuesday 31 July 2001 08:06, Jonathan de Boyne Pollard wrote to Eddy Thilleman: ET>> This new version of sweep has the same small delays as the ET>> previous one, so these delays might be caused by calling the ET>> command interpreter (CMD.EXE on my system). JdBP> Possibly, although it's always better to profile the application to JdBP> determine this. With a REXX script run within the command interpreter JdBP> process, there isn't the overhead of invoking an additional instance JdBP> of the command interpreter when one issues an external command, which JdBP> may be why your REXX script is faster. I don't have experience profiling with REXX. I'll look into this when I've time. JdBP> You can optimise things slightly, of course. Here are some JdBP> suggestions: JdBP> 1. Change your calls to DosFind{First,Next} to grab many directory JdBP> entries in a single call, rather than just a single one (and then have JdBP> an inner loop that iterates over the buffer entry by entry). Do I need to change or replace the lines with DosFindFirst() and DosFindNext() or should I just change the number of entries to find? Problably I need extra calls to DosFindFirst() and DosFindNext() to iterate over entries in the buffer? How would I make them work with the entries in the buffer? JdBP> 2. Obtain the value of the COMSPEC environment variable just JdBP> once. I already do this in all the versions. JdBP> 3. Use the API of my 32-bit CMD to invoke commands, rather than JdBP> spawning an instance of the command interpreter as a child process. JdBP> Commands would be interpreted by an interpreter for the CMD language JdBP> running directly in your SWEEP process itself. I need to study this, I haven't had the time yet (I don't know when I've the time). JdBP> If the problem is the process execution overhead for the command JdBP> interpreter, as you suspect, the third suggestion may result in the JdBP> largest speed increase. I'll look into it. Greetings -=Eddy=- email: e.thilleman@freeler.nl e.thilleman@hccnet.nl .... Beer Bong? Now that's a sport I can get into! --- GoldED/2 3.0.1 * Origin: "DOS for dummies?" Isn't that what Windows is? (1:2320/38.3) .