Slow loading 6,000+ artists in plugin

Hi all – writing a plugin for Archive.org’s Live Music Archive. It includes a ton of great (and legally posted) live music. The full list includes over 6,000 artists(!). Currently, I’m getting the artist list from the Advanced Search API via cURL and querying it with jq from the command line with nodejs’s child_process.spawn.

I can return the results from the API and build a “response” object for handleBrowseUri in less than 4 seconds for the whole list of artists (doing this for short lists takes a few milliseconds). The first time after a restart, Volumio loads this response to the web UI in a second or two more than it takes to build the “response” object for handleBrowseUri (5-8 seconds total). But subsequent loads, this can take a long time, as much as 20-30 seconds. Then after a restart it’s fast again.

So, why is this fast the first time and then slow later? Is there any way I can speed up loading this long list? (I’m planning on implementing a favorites list so you can only load a much shorter subset of this list if you want, but I’m like to be able to load the full list if possible).

My code is here: https://github.com/lostmyshape/volumio-livemusicarchive.

Thanks!
Noah

I’m not running into any problems loading that list. I went into your code, enabled the ‘real URL’ and disabled the ‘testing URL’ and still I’m loading the stations on my Pi2 in about 3 seconds or less. I tried multiple times and I also tried uninstalling and installing the plugin again to be sure. It seems to work well with both of the URLs in your code.

I have a fairly fast connection here, about 110 Mbps (which I don’t hit that often). Maybe that has something to do with it?

Just my two cents!

Jerry

Hey Jerry… Thanks!!! That’s great to hear. Maybe I’m having trouble with my browser caching or something. I’ve been away from Volumio for the last few weeks, but I’m ready to get back to this (and to test your Pandora plugin).