mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
playlist: Optimize playlist_remove_all_tracks()
This was insanely slow for large playlists. Implement it as a constant-time operation to avoid the O(N!) blowup, and add a new "clear" command to the control file to avoid flooding it with individual delete commands. Change-Id: Ied82d1cba015591edd583f2a2ff6772108f4e176
This commit is contained in:
parent
2c4546ba99
commit
25bd3bc971
2 changed files with 89 additions and 21 deletions
|
|
@ -47,6 +47,7 @@ enum playlist_command {
|
|||
PLAYLIST_COMMAND_SHUFFLE,
|
||||
PLAYLIST_COMMAND_UNSHUFFLE,
|
||||
PLAYLIST_COMMAND_RESET,
|
||||
PLAYLIST_COMMAND_CLEAR,
|
||||
PLAYLIST_COMMAND_COMMENT
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue