• 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 "date" vs current date
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Do shell script "date" vs current date


  • Subject: Re: Do shell script "date" vs current date
  • From: garbanzito <email@hidden>
  • Date: Mon, 11 Mar 2002 08:38:16 -0700

at 2002 03 11, 03:14 +0800, they whom i call bill wrote:
Yesterday I tried to make a time stamp by do shell script 3date2, found that
the speed is quite slow, compare to current date, below is the test:

[...]

While both current date and do shell script are in the standard addition,
any idea about the speed difference?

for something like date, the actual retrieval of the
information is very fast, so most of the time is spent in
overhead.

do shell script has to set up a shell process, including
handling standard input and output, and checking for errors.
this is quick in the overall scheme of things, but i'm not
surprised it's slower than an OSAX calls, which has no
separate process, and in this case, unlike the shell, is
specialized for returning just date info.

the advantage of the shell is dubious in cases where the
exact same info is available from Standard Additions.
however even just the shell's date command has some options
that might be hard to reproduce with current date.

--
steve harley email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Do shell script "date" vs current date
      • From: John W Baxter <email@hidden>
References: 
 >Do shell script "date" vs current date (From: bill <email@hidden>)

  • Prev by Date: Re: Curses! How to make new window in OSX Finder?
  • Next by Date: Re: Curses! How to make new window in OSX Finder?
  • Previous by thread: Do shell script "date" vs current date
  • Next by thread: Re: Do shell script "date" vs current date
  • Index(es):
    • Date
    • Thread