More Optimalisations to gmpc
Solving the speed problems drawing the playlist in gmpc, there are big 2 bottlenecks left that spoil that fun.
- MPD having to list all the id3 data, this is for a 65000 playlist easily more then 15 mb.
- The data has to travel over the network.
Discussing this problem with normalperson he made a patch to change the behauviour of the “plchanges” command to spit out only the songid/songpos, instead of all the id3 info. This limits the data transferred alot.
Next I changed it my treemodel backend to fetch and store the data when requested. Because you want the data availible for searches (a search would now block gmpc and wait for all the data to be fechted) I added anotherÂ idle function to fetch the not yet availible song data. This doesn’t block the interface, or does it block the communication with mpd (because it does one song at the time)..
So now when I connect to my mpd from gmpc over wireless (forced down to 6mbit), the playlist is (almost) directly availible,Â and also scrolling or jumping to songs seems to go withouth delay. In the background you see a 400kbit/sec data-transfer being gmpc fetching the missing data, withouth stopping me from controlling mpd.
I still need to fix/take care of some possible race conditions (f.e. clearing the playlist, while gmpc is still updating that data), but it looks promissing.