slimserver icon indicating copy to clipboard operation
slimserver copied to clipboard

TIDAL plugin performance

Open baf opened this issue 2 years ago • 17 comments

I'm running LMS 8.2.0 on CentOS 7.9, on a Hyper-V VM with 2 vCPU and 2GB RAM allocated. The TIDAL plugin shows version 2.0. My internet connectivity is 1Gbps symmetrical fiber.

I have been happily using LMS for some years (thank you!) I used to use it with the Spotty plugin for Spotify, which never gave me any performance problems; I also play internet radio, local FLAC tracks, and use the BBC Sounds LMS app without any problems. I recently switched to TIDAL for streaming music. I find that the TIDAL plugin doesn't perform very well - LMS menus hang while playlists or tracks load, and album art seems particularly problematic. I often can't start choosing and playing tracks with any kind of responsiveness (5-10 second delays between clicking add/play on a track and its appearance in the queue) until the UI has finished loading all album art for a playlist. This seems to persist whether I use the plugin itself to browse my TIDAL account or whether I use playlists/albums synced via the Online Music Library Integration.

I've tried any LMS setting that seems even remotely associated, as well as debug logging for every component, but that didn't seem to generate useful information. Is this a limitation of TIDAL's API or something of that nature?

baf avatar Jul 16 '22 20:07 baf

Not sure what's going on there. I admittedly am not a TIDAL user, but with my test account I don't see this level of delays. What are your LMS' settings for Artwork Resizing (Settings/Advanced/Performance)? Would changing that have any impact?

As for the lookups: is this in all menus, or only some, which might potentially have huge lists of items? I think we can only get 50 records per request to the TIDAL API, so getting eg. 500 items would require ten requests.

michaelherger avatar Jul 25 '22 13:07 michaelherger

Hi, Michael, thanks for the reply and for all of your work on LMS. I did play with the artwork settings and can report that the “use LMS to resize artwork” yields significantly better performance than the “use mysqueezebox.com” setting. I thought I had tried that in the past with little success, but did it again (paired this time with a “clear library and rescan everything” - not sure if that helped) and had better results.

There is still a delay of between 2-5 seconds in navigating through the plugin (e.g., between clicking Tidal, then My Playlists, then on a playlist, then upon clicking “add to queue” on that playlist). It’s noticeable but not intolerable, especially with the improved performance after the artwork change above. Perhaps the API limitation you described accounts for that in part, but I’d think the initial menus before loading actual playlist content would perform a bit better. Happy to try other suggestions or gather more data if you have any, but it’s usable at present.

baf avatar Jul 25 '22 19:07 baf

Ok, your comment about the image resizing proxy made me think... I had noticed slow loading of images on mysqueezebox.com for a while. That image proxy used to be much faster than the LMS built-in resizing. So I reviewed change history to the web server and found a change from almost a year ago which might have caused hit rate limiting (delaying responses). I've temporarily reverted that change.

Could you please re-enable the use of the online resizing proxy, then try again. In particular menus and lists you haven't visited before (to make sure requests aren't served from the local cache)?

michaelherger avatar Jul 26 '22 05:07 michaelherger

Could you please re-enable the use of the online resizing proxy, then try again. In particular menus and lists you haven't visited before (to make sure requests aren't served from the local cache)?

Did so this morning and now the album artwork performance seems comparable to the "use LMS to resize" option. Would you recommend leaving it that way?

baf avatar Jul 27 '22 14:07 baf

I believe the online proxy currently is the best choice for most users (and thus default). Thanks for the feedback!

michaelherger avatar Jul 27 '22 15:07 michaelherger

No problem! Let me know if there’s anything I can try or data/logs I can gather on the (relatively) slow menu performance for the Tidal plugin, but as mentioned, it’s livable with the album artwork speed improvement.

baf avatar Jul 27 '22 18:07 baf

Can this be considered done?

mherger avatar Dec 01 '22 06:12 mherger

Hi, @mherger - the album art issue is definitely resolved, but the overall performance issue remains. It often takes between five and 15 seconds to add a song from a playlist into the queue.

baf avatar Dec 03 '22 18:12 baf

Could you please enable logging for plugin.tidal, add a bunch of tracks, then send me the resulting server.log.zip?

https://www.dropbox.com/request/T3RctyzGgNg0oFDubq6a

michaelherger avatar Dec 04 '22 07:12 michaelherger