Re-read the folder without changing anything
(presumably that is still fast, but if not, stop there, as it tells us something else is making things slow)
Add the wildcard labels back
Re-read the folder again
(is it slow again, or fast again?)
It's possible it was only slow the first time it was read, and the wildcard labels weren't the thing slowing it down. That test should tell us if it's the case.
Lots of wildcards and lots of filenames will create some overhead (5000 x 70 = 350,000 wildcard tests), but the amount of time it takes shouldn't have increased between versions.
How many labels do you have? I'd be surprised if pure wildcard labels made that much difference. Filter labels can be slower but they're mostly calculated in the background.
I found that I had enabled the 'Match Full Path' option so I guess now that I remove it there are smaller Strings to apply the regex and is faster now.
Do you think if I brake my checks to non regex would perform better?
ex. (.*)\.(html|htm|url|wri)$
to become *.html *.htm *.url *.wri
I will have more checks but the function might be faster...