Importing playlists/crates is really slow
Bug #1171235 reported by
Steven Boswell
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mixxx |
Fix Released
|
Medium
|
Steven Boswell |
Bug Description
The first time I imported an external playlist (i.e. an .m3u file), I noticed that it was doing a database commit for every track. This is really inefficient. The enclosed patch provides a simple fix for this.
It turns out that CrateFeature:
Related branches
Changed in mixxx: | |
status: | New → In Progress |
assignee: | nobody → Steven Boswell (ulatekh) |
Changed in mixxx: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I only seem to be able to attach one patch per comment, so here's the other half of the fix.
TrackDAO: :addTracks( ) was trying to add each track in the playlist to the database. If most of the tracks are in the database already, this is a big waste of time.
I've rewritten the method so that it uses SQL queries to reduce the amount of work that needs to be done. Now it only tries to add tracks that were not already in the database.
On an imported playlist with ~1900 entries, this reduced the time needed to import from 5 minutes to 2 seconds.