pms icon indicating copy to clipboard operation
pms copied to clipboard

Use window parameter to retrieve database

Open carnager opened this issue 6 years ago • 3 comments

mpd supports the window parameter which allows to receive chunks of the database. This way one can bypass the buffer overflow which might happen with huge collections.

carnager avatar Aug 26 '17 13:08 carnager

Thanks, I was not aware of this. I anticipate that most users will have admin access to their MPD servers, thus this is not a prioritized issue. If you implement and test this however, I'm willing to merge it into master.

kimtore avatar Aug 29 '17 10:08 kimtore

i cant code go at all, but here is what i have done in my perl based client: https://github.com/carnager/clerk/blob/perl/clerk#L139-L156

it's just a few lines of code. and probably should have a setting in config file to set a chunksize. You don't want chunks to be too small, because each time the database is read completely, so small chunks slow it down a lot.

carnager avatar Aug 29 '17 19:08 carnager

I have no idea how to code Go either! I encourage you to give it a shot. It's pretty fast to set up a development environment.

tremby avatar Aug 30 '17 01:08 tremby