Search can be really slow
I've written about this before but I'm back again. Sometimes Search can be REALLY slow, and the problem is, there's no way to get out if it, which means beaTunes is effectively "locked up" for the duration.
This morning, I tried to search for a song, but I mistyped the first couple of letters, so I backed up and retyped. (I wanted to type the word "almost", but typed "alkmost", so I backed up, erasing the "tsomk" and typed what I wanted following the remaining "al" to become "almost cut my hair" (the David Crosby song). In fact, I might have erased all the way to the leading "a". I don't know for sure.
That caused beaTunes to search for about 30 minutes, and to my knowledge, there was no way to make it stop short of going into Task Manager and killing the task. And I hate to do that because I don't know how that affects the beaTunes database. I know it's working. (Image attached.)
I wish beaTunes would stop searching for what it WAS searching for when the user types something else in the Search box, and start searching for the newly input text. Otherwise, is there another way to get out of this situation? Thanks.
Windows 8.1 (yes, I know that OS went off MS support 2 weeks ago)
folder-based library, 500,000-plus tracks... which I'm sure is the reason this search took so long, given the input
database stored on the SSD C: drive
32GB RAM, 12G allocated to BEATUNES_MEMORY
Comments are currently closed for this discussion. You can start a new one.
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
1 Posted by Richard on 23 Jan, 2023 05:48 PM
The Search returned 228260 items (out of 506222), so I'm guessing those are the number of items that have an "a" or an "al" in the title? (I'm searching on Title.)
While I was typing this update, the 228260 items went away and is now displaying the 2 tracks I was looking for. So that was another 10 minutes for all that to happen. I do realize it takes time to dump that many items from the db result table.
It looks like it took all that time finding the "a" items even though I had tried to search for something else by that time, displayed them, then saw the new input ("almost cut my hair"), went about the process of clearing out the "a" result table (10 minutes or so), searched for the new text (which took milliseconds), and displayed that result.
Now I've been working awhile, pulling up various songs very quickly. But the most-recent one is back to churning, using a lot of CPU and taking a long time, 5 minutes and counting. This time I did not make a typo, i just typed in the title I'm looking for "psychodrama" with no errors and no back spaces, so maybe that's not a factor. I will send my log files once it returns results. (It should find just one song.)
Support Staff 2 Posted by hendrik on 26 Jan, 2023 10:54 AM
thanks for the report.
According to the logs, what's slow is searches for single characters in title etc. (but not all). This has a technical reason.
Since I am in the process of releasing v5.2.31, I have decided to delay the search for single characters a little bit, so that search is not triggered (as quickly) while still typing. Just FYI, currently, search is always triggered when you stop typing for more than half a second.
3 Posted by Richard on 26 Jan, 2023 07:53 PM
Thanks for the reply and the explanation. I do know that single letter searches will take a long time.
I wanted to say, though, that on the last one ("psychodrama") where it started searching for just "p". I KNOW I typed that one in almost continuously (p-s-y-c-... etc). Was I just a slow typist and took 501 ms between the "p" and the "s"? I didn't think so, but maybe.
I think the 1 second delay on single-character input will be very helpful.
The problem on "almost cut my hair" was that I made a typo "akl", I knew I mistyped, backed up to correct it (with the backspace key to the "a"), and then resumed my input as desired. There is going to be some delay between critical keystrokes in that situation. It's unavoidable. As a user, I guess the better approach would have been for me to highlight the bad "akl" input, and then type over it "almost", etc., to eliminate triggering the search on "a". That's a workaround I'll try to keep in mind, but it's unnatural.
On "guinnevere" (which wasn't a problem), I wasn't sure how to spell the title, so I was typing more slowly. I see that it searched on "guin", then on "guinn", then on the full title. Again, not a problem since it didn't take much time.
I still wish the user could abort an undesired search. Or, maybe a different approach would be, that you could make a change in beaTunes so that search would check for new user input every so often (maybe every 5 seconds?), and if it sees input different from what it is currently searching for, it aborts the in-process search and starts anew. Clearly, searches that take less than 5 seconds would just display the results and never hit the "check for new input" path.
I know these are problems only your users with very large libraries encounter.
On Thursday, January 26, 2023 at 04:54:59 AM CST, hendrik <[email blocked]> wrote:
Support Staff 4 Posted by hendrik on 26 Jan, 2023 08:45 PM
I have released v5.2.31 today. Could you please give it a shot and let me know how the changed behavior works for you?
5 Posted by Richard on 26 Jan, 2023 09:49 PM
Much better, hendrik. Thank you so much.
I started out with the title "zulu". Even when I delayed appreciably on "z" and then continued with "ulu", It didn't have a problem. The "z" search alone took about 4 seconds to display 1422 results, which is perfectly fine. Then I tried "vincent". Again, I really had to pause after the "v" for it not to let me continue with the "incent" part, which is good.
I decided to take the plunge and do "psychodrama" again. "Psychodrama" itself comes up right away. When I typed "p", counted a long 2, then typed "s" following, it took about 6 minutes to come up with 58000 "p"-only titles, then immediately started searching for "ps" which only took a few seconds to display 330 results.
I'm not going to try "a" and "almost" right now as "a" alone will still no doubt lock me up for awhile. But again, thanks for the change. I'm happy I made it in to the 5.2.31 release you were just about to put out.
On Thursday, January 26, 2023 at 02:53:48 PM CST, hendrik <[email blocked]> wrote:
Support Staff 6 Posted by hendrik on 27 Jan, 2023 08:44 AM
Thanks, Richard, for reporting, providing logs and testing!
hendrik closed this discussion on 27 Jan, 2023 08:44 AM.