• 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
Need a faster Find Duplicates Routine
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need a faster Find Duplicates Routine


  • Subject: Need a faster Find Duplicates Routine
  • From: "Johnny AppleScript" <email@hidden>
  • Date: Tue, 27 May 2003 12:58:53 -0600

Hey All,

Anyone know of any samples that will run faster than this? This one is fine
for under 300 items, but give it 3000 (3k X 3k = painfully inefficient), and
be prepared to wait... and wait... and wait...

set theItems to [a list of items]
set dupesList to {}
set checkList to {}
repeat with i from 1 to number of items in theItems
set x to the name of item i of theItems
if x is in checkList then
repeat with i from 1 to number of items in theItems
set y to item i of theItems
if the name of y is x then
set the end of dupesList to y
end if
end repeat
else
copy x to the end of checkList
end if
end repeat

TIA

JA
_______________________________________________
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: Need a faster Find Duplicates Routine
      • From: Gary Lists <email@hidden>
    • Re: Need a faster Find Duplicates Routine
      • From: Paul Skinner <email@hidden>
References: 
 >Re: Crontab message to user (From: Michael Stoll <email@hidden>)

  • Prev by Date: Re: Java Code in Applescript to access login boxes in Safari.
  • Next by Date: Re: Need a faster Find Duplicates Routine
  • Previous by thread: Re: Crontab message to user
  • Next by thread: Re: Need a faster Find Duplicates Routine
  • Index(es):
    • Date
    • Thread