Searching categories is very slow

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

XnXo
Posts: 8
Joined: Mon May 30, 2022 11:45 pm

Searching categories is very slow

Post by XnXo »

Hi. Newbie to XnView here. It seems very promising!

I have a folder structure with about 15,000 files.
I created a category in XnView and assigned it to all the files in one of the subfolders, about 75 files total, the only files to be given a category.
After that, I switched to the top level folder, and used Ctrl+F to search for files in that category.
XnView then started to look through every subfolder, apparently looking at each file, until it found the 75 with that category, this took several very long minutes. I tried this several times, with slightly different settings in the Find dialog, but always with the same results,

Something doesn't seem right. If the categories and the files they are attached to are stored in an XnView database, why does the program need to look at every file in the directory structure, rather than just finding results in its database, which should take just a second or two, or even less? As I type this, XnView is churning away, trying to perform what I'd think would be the most basic kind of search.

When I navigate back to the folder where the files are located, XnView finds the search results instantly, which makes sense I guess.....

There must be something I am not understanding. I've looked through various pieces of documentation, but I'm not finding anything.

Thank you.
User avatar
xnview
Author of XnView
Posts: 37883
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Searching categories is very slow

Post by xnview »

do you use 'catalog' for the search?
Pierre.
zarlan
Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

Re: Searching categories is very slow

Post by zarlan »

xnview wrote: Tue May 31, 2022 11:51 amdo you use 'catalog' for the search?
What does that mean, and how is it done?
XnXo
Posts: 8
Joined: Mon May 30, 2022 11:45 pm

Re: Searching categories is very slow

Post by XnXo »

Hi thanks for the reply. When I posted, I had not yet discovered the "Categories Filter" method of searching by category/keyword, if that's the one you mean. That is indeed much faster!

It still seems as though the Ctrl+F method of searching, even just for filenames, is much slower than expected, but I am still exploring the program.

Thanks again!

Zarlan - there is a panel called "Categories Filter" where if you have already created categories and assigned them to files, you can use the list in that panel to display only files matching the selected criteria.
zarlan
Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

Re: Searching categories is very slow

Post by zarlan »

XnXo wrote: Tue May 31, 2022 4:47 pmZarlan - there is a panel called "Categories Filter"
I am well aware of that, but that cannot be referred to as a "search", by any stretch of the imagination.
XnXo
Posts: 8
Joined: Mon May 30, 2022 11:45 pm

Re: Searching categories is very slow

Post by XnXo »

I kind of agree. It doesn't quite feel like a "search," and I don't think I'd want to go through that process for routine searches. But again, I'm still exploring the program and seeing what it has to offer.
User avatar
michel038
Posts: 889
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Searching categories is very slow

Post by michel038 »

In the search window, there is a checkbox that you can check to use the catalog, and get quick results...
zarlan
Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

Re: Searching categories is very slow

Post by zarlan »

michel038 wrote: Tue May 31, 2022 8:52 pmIn the search window, there is a checkbox that you can check to use the catalog, and get quick results...
What search window?
User avatar
michel038
Posts: 889
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Searching categories is very slow

Post by michel038 »

I'm not on my PC... Binoculars icon, maybe Ctrl F, or File>Search menu
zarlan
Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

Re: Searching categories is very slow

Post by zarlan »

michel038 wrote: Tue May 31, 2022 9:05 pmI'm not on my PC... Binoculars icon, maybe Ctrl F, or File>Search menu
Ah. I've found that some time earlier, and later completely forgotten it.
Either way, that should be referred to as a dialog, rather than a window.

Annoying how it only has the option of including all conditions, or any of all of them …though it does have an option to use regex …except that there is no explanation of how/where to do so, nor any explanation of the syntax. (speaking of which, you have yet to answer my questions, in regards to how to use regex, and what the syntax is, in the "quick search"-bar …which shouldn't be named "quick search", given that it doesn't search at all, but rather filters. I would like a genuine quick search function)
And though multiple conditions can be listed, the same can't be done for folders. Just one folder, or that folder recursively.
…and it's generally a bit confusing/unclear.
If XnView had good and proper documentation…
User avatar
michel038
Posts: 889
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Searching categories is very slow

Post by michel038 »

About Regex syntax, you can search on the web...
This link was given by Pierre :
https://doc.qt.io/archives/qt-4.8/qregexp.html
And this one offers a sandbox :
https ://regex101.com/