Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve search performance in FileBrowser #6962

Merged
merged 10 commits into from
Nov 10, 2023

Conversation

sakertooth
Copy link
Contributor

@sakertooth sakertooth commented Nov 4, 2023

Improves the search performance of the file browser by delegating the search to a worker thread. The main thread then builds the tree and displays it to the user.

Fixes #6874.

@Spekular
Copy link
Member

Spekular commented Nov 4, 2023

Clicking on a file that can be previewed will play the file in its entirely and not require to hold the mouse.

FYI this was already an option via #5787, see also #5427. I'd very much like to keep the option to stop samples on mouse release.

@sakertooth
Copy link
Contributor Author

FYI this was already an option via #5787, see also #5427. I'd very much like to keep the option to stop samples on mouse release.

Thanks for the heads up. Seems like I overrode that PR a bit. I'll fix it and push the commits soon.

@sakertooth sakertooth changed the title Refactor FileBrowser Improve search performance in FileBrowser Nov 5, 2023
@sakertooth
Copy link
Contributor Author

sakertooth commented Nov 5, 2023

Realized that this PR was far too invasive for little benefit other than search performance, so I put the focus on just that rather than a lot of unnecessary changes.

Edit: I was originally worried that trying to build the search tree on the main thread will freeze it up. It does for large enough directories (and very basic queries), but LMMS having to search through the entire root and home directories is largely unnecessary. This PR gives us a much needed boost in performance in general, but the next step would still be to minimize the search space.

@sakertooth sakertooth merged commit 5596abb into LMMS:master Nov 10, 2023
9 checks passed
@sakertooth sakertooth deleted the refactor-file-browser branch November 10, 2023 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Program freeze when searching in "My Computer"
3 participants