Note: This was split from
this original thread. I've inlined some of the original content to make this discussion make more sense.
Substring searches are relatively slow operations (not horrible, but slower than some). Because of this, and because they can be fragile (they don't persist if you re-arrange your disk structure), it is usually best to limit [Filename] contains type searches where possible in your media views. Stacking many of them can make a view slow to open and refresh.
If you need to parse the filename for some kind of metadata, you can usually accomplish the same thing, better, by using a
Tag on Import rule to apply a tag to the files in question at import. Then the substring search only needs to happen once at Import time, rather than for each file in the View every single time you open or refresh it.
Thanks for the tips on tagging, will it also be faster for my use? (which is hiding some files from the view), I guess I would first have some kind of "Hidden" tag and then make a rule checking for that tag?
Yes. I accomplish this kind of thing with "magic keywords" (though if you want, you can make specific custom Fields).
So, I have a special keyword "Hide from Views". All of the top-level Media Views (except "Advanced" where I want all files to show at all times) in my Library have the rule:
-[Keywords]=[Hide From Views]. I can apply this manually when needed, or automatically at Import with a Tag on Import rule (and do both, depending on the situation).
If preferred for your situation, you could do the same with a custom [Hide from Views] Field set to Check view style. I use [Keywords] because I have other "magic" keywords for other purposes, and [Keywords] are a pretty interchangeable field if I ever need to look at or use the metadata in another application.
A few other tips to keep your View searches responsive are:
* Order counts. Remember that Views with no filters at all will show ALL files. The first filter added is applied to every single file in your Library, one at a time. Then, the next filter in the list gets only the output of the previous one (so, it only has to parse the files that "survived" the first filter). So, if you are going to include a relatively slow operation, include it at the "bottom" of the search list whenever possible.
* Don't duplicate searches unnecessarily. Remember that Media Views are cascading searches. If you have a View under Audio in the tree (which already has a [Media Type]=[Audio] filter), then it is useless to include this search in any of it's child views (assuming they are set to include the parent searches, as they are by default), and this just slows it down making it do a search on every file that will always result in True. Move filters up as far in the View hierarchy as is possible for best results.
* Any search or category that does things "on the fly" with files on disk, rather than the Library metadata, is
slow, because it has to parse the file structure off of the disk (which is slow and limited by your disk's random access speed). This
especially includes things like IsMissing searches, and the Location category. Limit use of these features for when it is absolutely needed (especially IsMissing is best reserved for special "utility" Views).
* Be wary of complex searches that use Global Variables. They can be handy, but they are slower than other operations because they have to write to the Library, rather than just read. Limit use for when absolutely needed (and there are often ways around this).