• 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: do shell script speed (URL Access Redux)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script speed (URL Access Redux)


  • Subject: Re: do shell script speed (URL Access Redux)
  • From: Emmanuel <email@hidden>
  • Date: Thu, 25 May 2006 01:46:26 +0200

At 11:59 AM -0700 5/23/06, Christopher Nebel wrote:
On May 23, 2006, at 2:48 AM, Emmanuel wrote:

[...]
The big problem with do shell script is that it is awfully slow. We publish a page about that at:
<http://www.satimage-software.com/test_05_08/speed_test_result.html>

[...] The slowdown is entirely attributable to a switch from vfork(2) to fork(2) to create the new process. This was done for reasons of correctness -- "do shell script" does things in between the fork and the exec that are not allowed, but which happened to work in 10.3. [...]

Great you explained that, thanks. We updated the page above.

For a happy ending, I recall that do shell script's AppleScripty competitor, that is, having Terminal run in the background and scripting it, may make an efficient solution.

I report a quick test with "ls":

do shell script "ls"
 --  24 ms

tell application "Terminal" to do script "ls ../../ > a" in window 1
read alias "emmanuel's hd1T:Users:emmanuel:a" as «class utf8»
 --  < 3 ms

As someone else recalled, AppleScript is primarily an interapplication language. The good news is: it is fast like a greased lightning.

Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: do shell script speed (URL Access Redux)
      • From: Andrew Oliver <email@hidden>
References: 
 >Re: URL Access Redux (From: Timothy Bates <email@hidden>)
 >Re: URL Access Redux (From: Roger Howard <email@hidden>)
 >Re: URL Access Redux (From: Emmanuel <email@hidden>)
 >Re: do shell script speed (URL Access Redux) (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Searching for cells/rows/columns in Excel
  • Next by Date: Re: do shell script speed (URL Access Redux)
  • Previous by thread: Re: do shell script speed (URL Access Redux)
  • Next by thread: Re: do shell script speed (URL Access Redux)
  • Index(es):
    • Date
    • Thread