Rockbox

Tasklist

FS#9032 - "Create Playlist" doesn't work as expected anymore

Attached to Project: Rockbox
Opened by PaulJam (PaulJam) - Saturday, 24 May 2008, 19:06 GMT
Last edited by Jonathan Gordon (jdgordon) - Monday, 16 June 2008, 07:37 GMT
Task Type Bugs
Category Playlists
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi,

the entry "Playlists=>Create Playlist" now appends the songs to the playlist instead of overwriting the old playlist, so the root.m3u8 has many duplicates when you don't remove it manually before running "Create Playlist".
This behaviour started with revision 17352.

Also the creation of the playlist takes a little longer now.
H300 with ~3000 songs (dircache on, disk not spinning):
r17351: ~5s
r17352 & r17622: ~9s
This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Monday, 16 June 2008, 07:37 GMT
Reason for closing:  Not a Bug
Additional comments about closing:  refer to the last comment
Comment by Jonathan Gordon (jdgordon) - Sunday, 25 May 2008, 07:13 GMT
the first issue is fixed... dunn about the speed problem though
Comment by Jonathan Gordon (jdgordon) - Sunday, 25 May 2008, 07:40 GMT
unlikely.. but let me know if this speeds it up at all...
   changes (0.9 KiB)
Comment by Magnus Holmgren (learman) - Sunday, 25 May 2008, 08:35 GMT
In r17351, create playlist just did a very simple opendir/readdir loop, writing the result to a file. In r17352, filetree.c functions are used to load the directory. I'd guess that the biggest reason for the slow-down is that after having completed a directory, the parent directory is reloaded.

By the way, I don't quite like recursive functions having a local MAX_PATH filename buffer (that's playlist_directory_tracksearch)... The code removed in r17352 managed quite nicely without it. :)
Comment by Jonathan Gordon (jdgordon) - Sunday, 25 May 2008, 08:42 GMT
yes, but why have repeated code? if you want to fix it.. rework the svn code to not use the file browser...
Comment by Magnus Holmgren (learman) - Sunday, 25 May 2008, 12:10 GMT
Well, I wasn't complaining about removing the old/duplicated code, just pointing out why I thought the new code was slower. Fixing it would change the order of the files in the playlist though (but when generating recursively, the difference would mainly be in the degree of randomness).
Comment by Jonathan Gordon (jdgordon) - Monday, 16 June 2008, 07:36 GMT
this patch should speed it up, but the created playlist isnt in the sorted order it is now...

e.g...


/music/3 Inches Of Blood/Battlecry Under a Winter Sun - 2002/07 - Lady Deathwish.mp3
/music/3 Inches Of Blood/Battlecry Under a Winter Sun - 2002/10 - Hall Of Heroes.mp3
/music/3 Inches Of Blood/Battlecry Under a Winter Sun - 2002/05 - Skeletal Onslaught.mp3
/music/3 Inches Of Blood/Battlecry Under a Winter Sun - 2002/11 - Balls Of Ice.mp3
/music/3 Inches Of Blood/Battlecry Under a Winter Sun - 2002/06 - Journey To The Promiseland.mp3
/music/3 Inches Of Blood/Battlecry Under a Winter Sun - 2002/08 - Curse Of The Lighthouse Keeper.mp3
/music/3 Inches Of Blood/Battlecry Under a Winter Sun - 2002/01 - Ride Darkhorse Ride.mp3
/music/3 Inches Of Blood/Battlecry Under a Winter Sun - 2002/02 - Destroy The Orcs.mp3
/music/3 Inches Of Blood/Battlecry Under a Winter Sun - 2002/03 - Headwaters of the River of Blood.mp3

IMO its better to be slow and in order than fast (and really 4s wont hurt anyone...
   changes (3.5 KiB)

Loading...