Re: Damn send button / Wind chill
Re: Damn send button / Wind chill
- Subject: Re: Damn send button / Wind chill
- From: Shane Stanley <email@hidden>
- Date: Mon, 04 Mar 2002 16:10:05 +1100
On 4/3/02 2:45 PM +1000, J. B Stewart, email@hidden, wrote:
>
Ok, now I'm sure that someone will post that all this is beside the point.
True -- they will, and it still is.
The original point was nothing to do with whether nesting tells is good or
bad practice. It was simply whether it causes the code inside the inner tell
to run more slowly because of the existence of the outer tell. So far, the
only examples we've seen here suggest this is not the case.
People are entitled to their views on what is and isn't good practice. But
ascribing poor performance to such a practice when the evidence suggests
otherwise is zealotry. If it's bad practice, it's bad practice regardless of
whether it works or not (and vice versa). But calling it bad practice isn't
going to make it run any slower.
>
Oh and a 10 fold increase in speed is really negligible.
No, and neither is deliberately quoting people out of context. So let me add
some of your context:
>
> I cqn't test this because I don't have Jon's Commands installed (OS X) but
>
> try this as a test without BBEdit running at the start -
>
>
>
> set time1 to the ticks
>
> repeat 500 times
>
> set dte to date string of (current date)
>
> end repeat
>
>
>
> set time2 to the ticks
>
> repeat 500 times
>
> tell application "Finder"
>
> set dte to date string of (current date)
>
> end tell
>
> end repeat
>
>
>
> set time3 to the ticks
>
> repeat 500 times
>
> tell application "Finder"
>
> tell application "BBEdit 6.5"
>
> set dte to date string of (current date)
>
> end tell
>
> end tell
>
> end repeat
>
> set time4 to the ticks
>
> {time4 - time3, time3 - time2, time2 - time1}
>
>
>
> You should reasonably expect the following results, shouldn't you?
>
> Time3 - time2 and time2 - time1 should be almost identical since both are
>
> inside a single tell, one is "Finder" the other is "current application"
>
> time4 - time3 is going to be considerably longer since I used a totally
>
> unnecessary nested tell block which required that another application be
>
> launched.
Those who've stuck with this so far can make up their own minds.
--
Shane Stanley, 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.