Skip to content

Showing the contents of long saved playlists is very slow #697

@nis65

Description

@nis65

... and causes the mpd daemon to be at 100% CPU for multiple minutes, making all interactions through ampd very slow too.

And to make things worse, as this is a web application the ampd server does not see that the user closed the tab or switched to a different view, so the whole request is still being handled (and keeping mpd at 100% CPU time) even if nobody cares about the result any more.

As you wrote here:

That's because for every entry in the playlist, javampd sends a query to the MPD database

I think this is wrong and not necessary. According to man mpc, the mpd protocol supports requesting all information about all songs in a stored playlists in one go:

mpc -h MY_MPD_HOST --format "%file% - %name% - %artist% - %album% - %albumartist% - %comment% - %composer% - %date% - %originaldate% - %disc% - %genre% - %performer% - %title% - %track% - %time% - %file% - %position% - %id% - %prio% - %mtime% - %mdate% - %audioformat%" my_saved_playlist_name

This is quite fast when getting my playlist with over 1000 entries.

In addition, when I just want to delete a playlist (without actually wanting to see its content), that happens too. So I can't delete multiple playlists quickly...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions