Re: whose seems broken
Re: whose seems broken
- Subject: Re: whose seems broken
- From: Joe <email@hidden>
- Date: Thu, 21 Aug 2008 10:37:35 -0700
At 11:15 AM -0500 8/21/08, Luther Fuller wrote:
> try
> with timeout of 400 seconds
> tell application "Finder"
> set folderList to (get every folder of entire contents of disk "x" whose comment is "y") as list
> beep
> end tell
> end timeout
> on error
> display dialog "Time Out" buttons {"Cancel"}
> end try
> repeat with aFol in folderList
> display dialog aFol as text
> end repeat
>
>All I got was a "Time Out". I poked it a couple of times with a sharp stick, but still it just times out. Not even a 'beep', it just times out.
>
>How long would it take to do the same thing without using 'whose'? I wrote a quickie recursive handler to scan the entire disk "x" and in 23 seconds it returned a list of 33 folders having comment "y".
>
>'whose' and 'entire contents' have a reputation for slowness, but this seems to indicate that they are simply broken. They don't work. They ought to be the fastest method of filtering. They need to be fixed.
I don't think they are broken, but they are slow. The following line will time out if there are more than 200 - 300 files of that sort in a folder's contents. G5, 10.5.4.
tell application "Finder" to set x to (every file in the entire contents of thisItem whose kind is in {"Text", "Plain text", "text document", "SimpleText Document"} or name ends with "txt" or file type is in {"TEXT"}) as alias list
Joe
_______________________________________________
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