Re: Do shell script "date" vs current date
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.