Any way to improve the performance of this Applescript iTunes Code? -


I wrote a script that will recognize duplicates in iTunes, find their examples in the playlist, and other things that I do not think To check whether a track is duplicate is relevant, I have the following code to check:

  Get duplicated songs set (where every track in the playlist is equal to the name (currentTrackToCheck Name text) and __ not equal to database id (and As the present, the database ID of the Talk Check as an integer) and is equal to the time of (as the text of the current text)))  

I wrote and against it A test library with 1000 songs tested and it was fast when I tested it against my iTunes Library, which is approximately 30,000 songs, all hell became loose.

The snippet of code takes 2 minutes to finish processing! Is there any way to make it faster code-wise? I'm reading a lot on AppleScript and I believe where is the fastest way to filter results from a query.

Thank you! : -)

This will not affect the speed, but I will write it like this ...

  Set {iTunes} set {trackName, trackDatabaseID, trackTime} to duplicate songs of current track set {name, database ID, time} (get every track of playlist 1 name = trackName and Tell time = tracktime and database id ≠ trackdialbase id) end  

Comments