Re: Scripting Additions: Embracing the Horror of Unix
Re: Scripting Additions: Embracing the Horror of Unix
- Subject: Re: Scripting Additions: Embracing the Horror of Unix
- From: Jon Pugh <email@hidden>
- Date: Sat, 2 Feb 2002 10:31:22 -0800
At 1:51 PM +1100 2/2/02, Shane Stanley wrote:
>
I was just starting to, but then Tim raised the issue of slowness ;-)
Slowness is manageable. Generally it comes from doing the loop on the wrong side of a boundary. For example, you wouldn't want to write a loop in AppleScript that called do shell script "rm foo" over and over again, although that would work and if you only did it once it wouldn't even hurt.
Instead, if you were concerned about performance and doing the operation a lot, then you would need to consider using a faster delete or putting the loop on the unix side.
That's one of the major speed ups that Jon's Commands provides now, you can feed it a list so you only need to call it once. Ostensibly the rm command provides this feature too, so making use of it would also remove and/or justify a lot of the overhead involved in using the shell.
Jon