Page 1 of 1

[FIXED]It get super slow when switching back to a search tab result sorted by random order

Posted: 08 Mar 2023 18:23
by astral
Bug description:
I searched for files in a tab, several thousands of results are found. The total size is just around 3 GB.
I sort the files by random order in right click menu. Then switched to another tab and switched back.
It takes many seconds to respond, which is much longer than the searching process and random sort combined takes.

Software Version: 24.20

System Info:
Windows 11 Professional Insider Preview
22H2
2023/‎2/‎16
25295.1000
Windows Feature Experience Pack 1000.25295.1000.0


More:
And if there's tens of thousands of files, it stucks longer, also much longer than simply search and shuffle again .
The problem is not obvious when only tens of files are to be found.
Both images and other files alone will cause this problem.
And it actually stuck after searching again finished, so I doubt the random_shuffle process is called more than once.
And I think maybe we can just restore the search result of the tab until mannualy asked to search again or the tab is closed.

Re: It get super slow when switching back to a search tab result sorted by random order

Posted: 09 Mar 2023 10:29
by admin
Is caching enabled?

Configuration | Find and Filter | Find Files & Branch View | Find Files | Cache search results

Re: It get super slow when switching back to a search tab result sorted by random order

Posted: 09 Mar 2023 10:53
by astral
admin wrote: 09 Mar 2023 10:29 Is caching enabled?

Configuration | Find and Filter | Find Files & Branch View | Find Files | Cache search results
I tested on Windows10 this time.
I tried both enabling cache(FindCacheMaxCount=0 so it will always cache) and disabling cache. Cache do accelerate the search from around 5s to less than 1s. But under both configuration, It will stuck for around 10s after the search finished. If it's not sorted by random order, there's nothing wrong.
Also just refreshing a search result sorted by random order will also cause the problem.

Re: It get super slow when switching back to a search tab result sorted by random order

Posted: 09 Mar 2023 11:53
by admin
Any special columns showing?

Re: It get super slow when switching back to a search tab result sorted by random order

Posted: 09 Mar 2023 13:37
by astral
admin wrote: 09 Mar 2023 11:53 Any special columns showing?
No special columns showing or special configuration.

I installed on another laptop, it keeped trial version and all installtion settings are default, and did not change the configuration or even the layout.
I searched ".dll" in C:\Windows , and right click menu "sort by -> Random Order", then "Refresh List". The program searched again and after the search finished, it stucks for tens of seconds.
It's not responding until about 0.5 minutes later (time used to search again is excluded) .

Re: It get super slow when switching back to a search tab result sorted by random order

Posted: 09 Mar 2023 15:18
by RalphM
XY excluded from AntiVirus tools?

Re: It get super slow when switching back to a search tab result sorted by random order

Posted: 09 Mar 2023 16:16
by admin

Code: Select all

I searched ".dll" in C:\Windows ...
1) Was it Quick Search (F3) or Find Files (Ctrl+F)?

2) How many DLLs did you find?

3) I repeated your steps but everything went totally normal. Random ordering about 50,000 DLLs was near-instant in all circumstances.

Re: It get super slow when switching back to a search tab result sorted by random order

Posted: 09 Mar 2023 18:04
by astral
admin wrote: 09 Mar 2023 16:16

Code: Select all

I searched ".dll" in C:\Windows ...
1) Was it Quick Search (F3) or Find Files (Ctrl+F)?

2) How many DLLs did you find?

3) I repeated your steps but everything went totally normal. Random ordering about 50,000 DLLs was near-instant in all circumstances.
(1) Both may have such situation
(2) 34,000 DLLs
(3)
Here's a video about what I did and what happened.
https://drive.google.com/file/d/1-KWmHf ... share_link

Re: It get super slow when switching back to a search tab result sorted by random order

Posted: 09 Mar 2023 18:21
by highend
I see the same behavior with 24.20.0010 (fresh instance)

Re: It get super slow when switching back to a search tab result sorted by random order

Posted: 09 Mar 2023 18:27
by admin
Alright, I see it with fresh as well. Going to work... :twisted:

Re: It get super slow when switching back to a search tab result sorted by random order

Posted: 09 Mar 2023 18:34
by admin
It's the feature called "Permanent Custom Sort Order". When selecting the tab, XY tries to restore exactly the same order it had when you backgrounded that tab the last time. But with a limit: it only stores and restores the top 5000 items. Still the process takes a while in a huge list.

It cannot stay as it is, but what to do? I suggest to keep that limit of 5000, but in a stricter way: If a list has more than 5000 items, totally forget about "Permanent Custom Sort Order"! OKAY?

PS: still have to see why I could not see the issue in non-fresh... :? ---> now I see it... :eh: :ninja: :whistle:

Re: It get super slow when switching back to a search tab result sorted by random order

Posted: 09 Mar 2023 18:48
by admin
Should be fixed in next beta. :beer: :party:

Re: It get super slow when switching back to a search tab result sorted by random order

Posted: 10 Mar 2023 09:43
by astral
admin wrote: 09 Mar 2023 18:48 Should be fixed in next beta. :beer: :party:
:party: Glad switching tabs no longer cause long stuck.
:D It's amazing the new version come out really quick. When I saw the lastest release didn't mention this, I thought it will be fixed next day. But now I found it's because there's another version after the fix.
:tup: :tup: :tup:

But there's still a long stuck after using "Refresh List" in a large search result tab Sort By -> Random Order.
Still, it's obviously longer than the time cost of searching again.

v24.20.0018 No-Install Package
Fresh instance with default configuration.

Re: It get super slow when switching back to a search tab result sorted by random order

Posted: 10 Mar 2023 10:25
by admin
astral wrote: 10 Mar 2023 09:43 But there's still a long stuck after using "Refresh List" in a large search result tab Sort By -> Random Order.
Still, it's obviously longer than the time cost of searching again.
When I do "Refresh" (F5) or "Refresh List" (Ctrl+F5) in a search result tab, the list turns back to normal browse mode. :?
Ah, it depends on the tab caption as well (setting of Configuration | Find and Filter | Find Files & Branch View | Find Files | Show search results in). Anyway, it will be fixed in the next beta.