• 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: Slow vs faster
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slow vs faster


  • Subject: Re: Slow vs faster
  • From: Axel Luttgens <email@hidden>
  • Date: Sat, 8 Jan 2011 18:50:37 +0100

Le 8 janv. 2011 à 08:28, Axel Luttgens a écrit :

> Hello Luther,
>
> Do you mean that:
>
> 	on walk1(A)
> 		tell application "Finder"
> 			repeat with F in (sort folders of A by name)
> 				my walk1(F)
> 			end repeat
> 		end tell
> 	end walk1
>
> is intrisically much slower than:
>
> 	on walk2(A)
> 		tell application "Finder"
> 			set L to (sort folders of A by name)
> 			repeat with I from 1 to count of L
> 				set F to item I of L as alias
> 				my walk2(F)
> 			end repeat
> 		end tell
> 	end walk2
>
> on your machine?
>
> [...]
>
> Anyway, I guess my walk1/walk2 comparison didn't catch your point.
> [...]


Mea culpa.
I was reasoning as an old-fashioned scripter instead of a modern one. :-(

In walk2, passing F as an alias seems to yield sufficient speed improvement in the 10.6 Finder to almost compensate for the coercion into an alias. Making an additional use of F in the 10.6 Finder (as with the select statement in your script) thus allows to fully benefit of the speed improvement brought by an alias.


Axel

 _______________________________________________
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: 
 >Slow vs faster (From: Luther Fuller <email@hidden>)
 >Re: Slow vs faster (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: Slow vs faster
  • Next by Date: Re: New to AppleScript,please help.
  • Previous by thread: Re: Slow vs faster
  • Next by thread: Re: Slow vs faster
  • Index(es):
    • Date
    • Thread