Well, the built-in Search option is based on SQL while this script is based on VBScript. SQL is the fastest for the database manipulations, but VBScript is more flexible. For example, with the built-in option you cannot search for an unspecified string like disc x where x could be any number. By the way, if you want to search for some string that is at the end of some field, you could add the $ at the end of the regular expression. I am not sure, but I suppose that the execution would be faster in that case since programmatically it is always faster if you search for some string from the begin or the end rather then if it is in any another place in the middle.MMuser2011 wrote:I have a speed issue:
If I search for all albums in my (huge) Entire Library with the wrong/double spelled "(disc x) (disc x)" in the album name - with x as a number from 1-999 - I do a search with this regexp into the field ALBUMand replace it with $1.Code: Select all
(\(disc ([1-9][0-9]{0,2})\)) (\(disc ([1-9][0-9]{0,2})\))
Technically, this works perfect.
Because I'm cautious, I would like to see all the matching results of the RegExp before I press "replace all". If I choose "Select matched", it takes over 12 Minutes until I get the result. The other option "Keep matched" is just a few seconds faster.
So how can I do a RegExp search in my entire library and only get back the matching result visible BEFORE I apply any changes?
Just to compare: If I use the builtin CTRL-F search and look for the fixed string "(disc 1) (disc 1)" it takes 5 seconds to obtain my desired result. What am I doing wrong? How can I speed this up?
If you want to get displayed only tracks that have Album containing "(disc x) (disc x)" maybe you could try Magic Nodes add-on with the next Filter:
Code: Select all
<Album> Glob '*(disc *) (disc *)*'