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

Make Dopamine snappier #1172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Urmeli0815
Copy link

@Urmeli0815 Urmeli0815 commented Jul 12, 2020

I like Dopamine a lot and it is my favorite music player on Windows 10. But I noticed considerable lags when using it with my music collection that resides on a network drive. It takes very long to scan all those titles and even after the whole library was scanned Dopamine still felt laggy in different areas like clicking on an artist or just quitting the application where it hung often.

So I looked at the code and found some areas which can be improved. I took a shot at trying to improve it and got the refresh of the library down from 174sec to 34sec (~80% speed up!).

Changes include:

  • parallelized many stuff like retrieving the folder paths, updating the tracks, ...
  • usage of SQLite to prevent generation of a lot of objects which need to be garbage collected
  • added TerminationService to support cancelling of long-running tasks as fast as possible, especially upon termination
  • activated foreign keys in SQLite database; QueuedTrack now just references Track instead of copying the path data
    ...

I don't expect this PR to merged as it is but if you want use it as a source of ideas to improve the performance of Dopamine.

Keep up the great work!

@Urmeli0815 Urmeli0815 force-pushed the master branch 2 times, most recently from 2fbdcba to b8578d0 Compare July 12, 2020 16:19
- parallelized many stuff like retrieving the folder paths, updating the tracks, ...
- elevate the usage of SQLite to prevent generation of a lot of objects which need to be garbage collected
- added TerminationService to support cancelling of long-running tasks as fast as possible, especially upon termination
- activated foreign keys in SQLite database; QueuedTrack now just references Track instead of copying the path data
@digimezzo
Copy link
Owner

@Urmeli0815 Sorry for the late reply. Thanks a lot for your effort! I will sure take a look at it and use it for improvements.

@prakharb5
Copy link

Will this be added to new version?

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.

3 participants