• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript and shell scripting - a starting point
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript and shell scripting - a starting point


  • Subject: Re: AppleScript and shell scripting - a starting point
  • From: Philip Aker <email@hidden>
  • Date: Sat, 28 Jul 2007 16:49:37 -0700

On 2007-07-26, at 09:47:49, Emmanuel wrote:

At 5:23 PM +0100 7/26/07, Seth Havens wrote:
Shell scripting isn't so scary!

No, but it's so much slower than an osax!

Here are my results (PBG4) (all measured on 2nd run, to allow for any loading/caching mechanism):

tell app "Finder" to delete f
-- 66 ms

do shell script "rm" & fx
-- 50 ms

fileremove f -- in Files.osax
-- 2 ms

I'd like to protest these kinds of pseudo tests (for the second time) being posted to the list. You've deliberately avoided the load factor of the OSAX by not so slyly measuring from the second run. Secondly, you've not put the shell call into its own idiom. See here the results calling 'rm' on a 144K file from Terminal:


# time rm doc.pdf
real    0m0.039s
user    0m0.001s
sys     0m0.005s

And thirdly, you've not made any effort to show the counterpart of calling shell from AppleScript by measuring calling AppleScript from shell.

Philip Aker
email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: AppleScript and shell scripting - a starting point (From: "Seth Havens" <email@hidden>)
 >Re: AppleScript and shell scripting - a starting point (From: Emmanuel <email@hidden>)

  • Prev by Date: Address book
  • Next by Date: Re: AppleScript-Users Digest, Vol 4, Issue 352
  • Previous by thread: Re: AppleScript and shell scripting - a starting point
  • Next by thread: Re: AppleScript-Users Digest, Vol 4, Issue 349
  • Index(es):
    • Date
    • Thread