Subj : sweep To : Vitus Jensen From : Eddy Thilleman Date : Sat Mar 10 2001 07:34 am Hello Vitus, Tuesday 06 March 2001 09:22, Vitus Jensen wrote to Eddy Thilleman: ET>> I've written a sweep command in pascal and compiled it with ET>> Borland Pascal as DOS .EXE file and compiled it with Virtual ET>> Pascal/2 v2.1 build 243 as OS/2 .EXE file, and implemented it ET>> also in REXX. VJ> I'm still uncertain what a "sweep" program means. I program which VJ> searches the disk for certain files (.bak, etc) and removes them? No, sorry. Sweep is a program that runs the as parameter (on the commandline) given command in the current directory and in all of its subdirectories. for example: sweep dir runs the dir command in the current + all its subdirectories another example sweep for %a in (*.bak) do echo %a The compiled version is easier to use than the REXX variant. VJ> The usual reason is that you display one character at a time. If you VJ> have control over the code which does the screen output (e.g. you are VJ> directly calling Vio*) try to buffer characters. I use the standard writeln Pascal statement, I don't know if that's the cause. I haven't looked at the underlying source code. I don't know if I have the underlying source code for the writeln statement in VP/2, because I can't find the source code for VP/2's system unit. ET>> Shall I post the source of all three? VJ> Are you sure it's the screen output? No, I'm not certain. VJ> If not, remove screen output from the program and rerun it. I've run it without screen output from all the sweep variants themselves, the only screen output is by the command run in each (sub)directory. The command in the compiled OS/2 version is run somewhat slower. VJ> If you know the offending part in the OS/2 EXE it may be an idea to VJ> post that part. I don't know what the cause is. My best guess is that the loading and initializing of cmd.exe takes more time than command.com. Cmd.exe and command.com are located on the same partition. In a few days (I don't have the time at the moment), I'll put a copy of cmd.exe on a ramdisk and modify the sweep pascal source code to start the cmd.exe file on the ramdisk, to see if that cuts down the difference. Greetings -=Eddy=- email: e.thilleman@freeler.nl e.thilleman@hccnet.nl .... The NEW XT EMULATOR! MicroSoft Windows NT --- GoldED/2 3.0.1 * Origin: OS/2 in '92! (2:280/5143.7) .