clementine-player / Clementine

:tangerine: Clementine Music Player
https://www.clementine-player.org/
GNU General Public License v3.0
3.79k stars 685 forks source link

Global search is extremely slow when the query contains spaces #6435

Open rfgiusti opened 5 years ago

rfgiusti commented 5 years ago

Before posting

Please follow the steps below and check the boxes with [x] once you did the step.

System information

Please provide information about your system and the version of Clementine used.

Expected behaviour / actual behaviour

Expected: Global search time complexity doesn't depend on whether it contains spaces

Actual: When using the global search, the number of characters does not seem important. Regardless of the length of the search term, inserting a space into the search seems to increase the processing time from imperceptible to several seconds (with unresponsive UI).

Aditional information: This happens with a rather small library (~5,000 files). Selecting every music into a playlist and searching for the same term on the playlist works as intended.

Steps to reproduce the problem (only for bugs)

JulianVolodia commented 5 years ago

Hi @rfgiusti because a lot of changes on master and issues are out there, I am asking you gently to re-check on bleeding edge from builder instance (build from master on CircleCI).

If it not works as you wish please attach most verbose log you could. Check how your iotops behave and if it is problem with no cache of index that you look for.

Best regards.

rfgiusti commented 3 years ago

Hello, @JulianVolodia. Apologies for not answering timely.

I just download and tested the .deb package for the 1.4.0rc1-471-gb989a674a version of Clementine. The issue still happens to me.

According to iotop, after I entered a search term which I'll "mask" as wwww w wwwwww in thi message, Clementine had a spike in I/O read. The Clementine interface is unresposive since I began writing this message (6 minutes and counting). The actual search term I entered was longer, but the remaining characters don't appear on the interface yet.

I am now going to kill Clementine and attempt to produce a log after I have restarted it.

rfgiusti commented 3 years ago

Here's the log: https://gist.github.com/rfgiusti/fa20a9468283180ed634909c4a4ff161

Some notes:

JulianVolodia commented 3 years ago

Sorry for late response, to be honest I not yet planned to reproduce that but thanks for filing complete reproduction steps.

rfgiusti commented 2 years ago

Hello, any hope checking this? I tested on the latest release and different PC, but the issue persists.

I was happy work-arounding this by adding all my music files to a temporary playlist, but issue #6723 complicates things because I have to search new tracks before adding them to the playlist.