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

Speed up tracks screen when no Smart Folders are used (partial fix for #17805) #19228

Merged
merged 2 commits into from
Mar 4, 2024

Conversation

sonora
Copy link
Member

@sonora sonora commented Mar 2, 2024

No description provided.

@Chumva
Copy link
Member

Chumva commented Mar 4, 2024

Will there be any issues if we add new smart folders, but allAvailableTrackItems in SmartFolderHelper is empty?

@sonora
Copy link
Member Author

sonora commented Mar 4, 2024

I have tested both creating a first smart folder and removing the last smart folder with that patch, and both worked apart from the slowness which returns then with the smartfolder code becoming active again, it seems.

I think eventually we have to dig deeper to find a more complete solution here. As Victor said, neither reading 3500 file system line items to memory nor the creation of an (essentially empty) HashSet for the smart folders should really have to take as long as the app needs here...

@sonora
Copy link
Member Author

sonora commented Mar 4, 2024

PS: When I have 1 (unfiltered) smart folder present and re-enter the Tracks screen, I can see that the app takes initially about 8 seconds to populate that smart folder (I can see the sub-header counting up), then about another 5 seconds to create the other (static) root folders (I have ~70). So with a smart folder I am back at the original 12-14 seconds... 😉

8 seconds to create a simple HashSet seems over the top? Or if that's what it takes then we should cache things?

@Chumva Chumva merged commit 0d662f3 into master Mar 4, 2024
3 checks passed
@Chumva Chumva deleted the speedUpTracksScreen branch March 4, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants