kimtore / pms

Practical Music Search is an interactive Vim-like console client for the Music Player Daemon.
https://ambientsound.github.io/pms/
MIT License
249 stars 23 forks source link

Use window parameter to retrieve database #89

Open carnager opened 7 years ago

carnager commented 7 years ago

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.

kimtore commented 7 years ago

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.

carnager commented 7 years ago

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.

tremby commented 7 years ago

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.