Slow quick search with /t switch compared to standard search

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
Pagat
Posts: 310
Joined: 09 Oct 2007 21:23
Location: Austria

Slow quick search with /t switch compared to standard search

Post by Pagat »

Hello,

first things first: XYplorer: 28.30.1300 (64-bit). Other data see signature.

after years (decades?) of smooth sailing with XYplorer i want to clarify something where i'm not sure if it's a bug or by design:

I have a tag.dat database with ~20k entries. All of them on a network location path. When i search for tags via the "standard search" (Info Panel | Find Files | Tags) the result shows almost immediately. This is expected and fine as the tag.dat is searched first when i search (only) for tags.

However, if i do the same search via Quick Search with the /t switch (e.g. "tags:Dogs /t") the search takes ages to complete. Looks like the quick search first enumerates the file system (network path) and only afterwards cross checks against tag.dat (whereas the normal search apparently does the opposite).

Is this by design (i.e. Quick Search can only work this way for some reason) or is this a bug. Or did i overlook something?
OS: Windows 11, 64-bit, Version 25H2, Build 26200.8655 (10.0), AMD64
Monitor: 1/2 (Primary) Primary Screen DPI: 96 (100%)

highend
Posts: 14963
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Slow quick search with /t switch compared to standard search

Post by highend »

Mh, tag database is here:
\\192.168.0.50\int_01_crypt\SharedTags.dat

Using the current beta it takes ~7-8 seconds until the search result is displayed.
The search time is identical regardless if I use QuickSearch with tags:Dogs /t
or the standard search with "Dogs" in tags

35810 items are tagged, 19998 items contain the tag "Dogs"...
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 66405
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Slow quick search with /t switch compared to standard search

Post by admin »

7-8 seconds is very slow for the /t switch. Is it faster in the 32-bit version?

highend
Posts: 14963
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Slow quick search with /t switch compared to standard search

Post by highend »

No, about the same performance. Note that all tagged items are inside the network location as well, not local (that's what the OP uses if I understand him correctly)...
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 66405
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Slow quick search with /t switch compared to standard search

Post by admin »

Are you saying that 7-8 seconds is expected in this context?

highend
Posts: 14963
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Slow quick search with /t switch compared to standard search

Post by highend »

Can't say. I'm not a tagging guy, I've only done the tests because of the post.

Code: Select all

    $start = now("msecs");
    $a = quicksearch("tags:Dogs /t", , , "o");
    status "Time: " . now("msecs") - $start . " msecs";
~8000 msecs

And this doesn't include any displaying of the items.
I wouldn't call it fast ;)

Have to leave now, a concert in Hamburg...
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 66405
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Slow quick search with /t switch compared to standard search

Post by admin »

Have fun! :party:

Pagat
Posts: 310
Joined: 09 Oct 2007 21:23
Location: Austria

Re: Slow quick search with /t switch compared to standard search

Post by Pagat »

Ok, some more context: This scenario takes place in my Image Organization instance of XYplorer (own configuration, own tag.dat). In this instance i basically only browse the network path \\NAS\photos\ which is a network share in my local network. The files in tag.dat are also stored with UNC paths (not with a mapped drive letter). In tag.dat 21245 files are tagges (which are 99% of all files in this network folder). I also did this on a "fresh" config of XY (only tag.dat was updated).

I do both searches from the root folder \\NAS\photos:

Standard search for tag "Dog": found 171 files. Status bar says: "search done in 901,3 ms (scanned 21.245 items in tags database)
Quick search "tags:Dog /t": first results appear after 23 seconds.

So even though highend cannot replicate the difference between standard and quick search, do you have any idea what might be the root cause of the differences on my system?
OS: Windows 11, 64-bit, Version 25H2, Build 26200.8655 (10.0), AMD64
Monitor: 1/2 (Primary) Primary Screen DPI: 96 (100%)

admin
Site Admin
Posts: 66405
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Slow quick search with /t switch compared to standard search

Post by admin »

Looks like a bug. It's on my list.

admin
Site Admin
Posts: 66405
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Slow quick search with /t switch compared to standard search

Post by admin »

Perform the tags:Dogs /t quick search, then call script text <get find_queryparsed>;. You should get something like this (the crucial line here is Tags DB Only: Yes):

Code: Select all

Query:  tags:Dogs /t
Parsed: Tags:dogs

Search: Quick Search
Mode: Auto
Smart Boolean Query Parsing: No
Extended Pattern Matching: No
Master Invert: No
Tags DB Only: Yes

Match Case: No
Whole Words: No
Invert: No
Ignore Diacritics: No
Path: No
Find Hidden: No

Search Path: Desktop\Test\a\
Quick Search Pattern: tags:Dogs /t
Include Subfolders: Yes
Follow Junctions: No

Pagat
Posts: 310
Joined: 09 Oct 2007 21:23
Location: Austria

Re: Slow quick search with /t switch compared to standard search

Post by Pagat »

My result for the quick search:

Code: Select all

Query:  tags:Dogs /t
Parsed: Tags:dogs

Search: Quick Search
Mode: Auto
Smart Boolean Query Parsing: No
Extended Pattern Matching: No
Master Invert: No
Tags DB Only: Yes

Match Case: No
Whole Words: No
Invert: No
Ignore Diacritics: No
Path: No
Find Hidden: No

Search Path: \\NAS\photo\
Quick Search Pattern: tags:Dogs /t
Include Subfolders: Yes
Follow Junctions: No
And it's funny that this code snippet return "Tags DB Only: No" for the standard search (Info Panel | Find Files | Tags where it definitely just searchs the tag.dat due to it's speed:

Code: Select all

Query:  *
Parsed: Name:*

Search: Find Files
Mode: Standard
Smart Boolean Query Parsing: No
Extended Pattern Matching: No
Master Invert: No
Tags DB Only: No

Match Case: No
Whole Words: No
Invert: No
Ignore Diacritics: Yes
Path: No
Find Hidden: No

Search Path: \\NAS-Wohnung\photo
Include Subfolders: Yes
Follow Junctions: No
OS: Windows 11, 64-bit, Version 25H2, Build 26200.8655 (10.0), AMD64
Monitor: 1/2 (Primary) Primary Screen DPI: 96 (100%)

admin
Site Admin
Posts: 66405
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Slow quick search with /t switch compared to standard search

Post by admin »

Yes, I saw that too, it's a bug in <get find_queryparsed> that's fixed in the next beta. :)

So, both should have the same speed, but in your case they don't?

Pagat
Posts: 310
Joined: 09 Oct 2007 21:23
Location: Austria

Re: Slow quick search with /t switch compared to standard search

Post by Pagat »

Yes, as described. Even in a "fresh" installation with just the customized tag.dat.
OS: Windows 11, 64-bit, Version 25H2, Build 26200.8655 (10.0), AMD64
Monitor: 1/2 (Primary) Primary Screen DPI: 96 (100%)

admin
Site Admin
Posts: 66405
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Slow quick search with /t switch compared to standard search

Post by admin »

I can neither reproduce it nor explain it. Both ways run the same code. :?

Post Reply