Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


performance - android client
#1
hi, apologies if this has been discussed.  I did not see any specifically related threads.

I'm seeing a huge performance difference between a windows client and an android client.  I think I need to provide specifics on my setup for this to be useful.  I'm running moode 7.01 on a pi4, 4 GB.  All my music is on an NFS server (also pi4, 4 GB).  The connection between the server and the moode player is wired cat6 ethernet (a couple of 100 mbit fast ethernet switches make the connection).  The music repository on the server is pretty large, over 20,000 albums, nearly all flac.  For clients I have used multiple android devices - phones and tablets, multiple windows laptops, and I have tried nearly every browser out there.  On android, I seem to have done best with opera lite.  On windows, I've mostly used firefox.  Regardless of whether the windows laptop clients are wired or wireless, I get decent performance - response to clicks is good enough (one caveat is the tag view, which is pretty unuseable with a large music repository.  Even on wndows, it takes about 8 seconds to get a response to selecting, say, an artist in the tag view.  I'd love to have the tag view functionality, but that doesn't seem possible without a significant architecture change, whether in moode or more likely in the mpd indexing)

On the android client, with a largish playlist (say 2000 songs), turning shuffle on or off can take several seconds.  Ditto for going from play to pause, or changing from playback to library views.  Back in the day, I did unix admin.  there was a rule of thumb for user interfaces: we tried to keep response around 50 ms, so several seconds is pretty problematic.  All my android devices are running fairly recent versions of android.  The tablet does a fair bit better than a phone, but still exhibits this behavior.  I have cover display turned off on the playlist view to help performance a bit, but it doesn't solve this problem.  First connection from the client to an idle moode using an android device can take multiple 10s of seconds.  This does not happen if I use my windows laptop. If I accidentally select the tag view on android, I can pretty much go get lunch.

I have used many digital playback systems in the last 25 years, including some I built myself (but I'm not a software developer).  Moode is terrific, best I have used.  Somewhere around moode 6 the performance for large repositories became much better, and is greatly appreciated.  performance in 7 seems more sluggish than 6, but the android problem is there in all versions.  I realize there may not be a fix without significant rearchitecture in moode or mpd, but wanted to put this on the table for awareness and any discussion.  

I love moode, but perhaps can sully this post with one minor suggested improvement: "set favorites" currently requires you to type your selection.  often I want to set the favorites to an existing playlist and may not remember its exact name.  having the option to select from a list of current playlists would be very nice IMO.
Reply
#2
sorry, just a bit of clarification.  It could well be that with the current software architecture - whether moode, mpd or both - the resource requirements on the client side are just too great for handheld devices, at least moderate ones.  Certainly my windows laptops have richer resources - CPU, memory, etc - than my android devices.  I did not mean for this to be framed as windows vs. android, more of an awareness of possible limitations due to the client resource and performance requirements of the current software architecture for large repositories.
Reply
#3
moOde is not really designed for extreme sized collections because they are an edge case better suited for players specifically geared for managing hundreds of thousands of tracks.

There could certainly be a discussion of which areas of moOde code could be improved to better handle large lists. @swizzle has made numerous, significant contributions to this effort over the years.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
There is an issue with some android phones whereby browsers that are based on chromium (i.e. all of them bar Firefox) will experience freezes on certain actions that get longer with larger libraries, and can lead to crashes in some cases. Have you tried Firefox on the Android device? It may perform a bit better.
I have a middle range android phone and can only get by with Firefox for moOde.
----------------
Robert
Reply
#5
(02-05-2021, 09:24 AM)the_bertrum Wrote: There is an issue with some android phones whereby browsers that are based on chromium (i.e. all of them bar Firefox) will experience freezes on certain actions that get longer with larger libraries, and can lead to crashes in some cases.  Have you tried Firefox on the Android device?  It may perform a bit better.
I have a middle range android phone and can only get by with Firefox for moOde.

Thanks for the suggestion. I have used chrome, firefox, and opera on an android phone, in fact started with firefox.  I settled on opera lite.  I think my only solution is to put a more capable client in my listening room, maybe a chromebook or surface box.

with regard to tim's comments, I understand that my large collection may be a corner case - today.  I suspect I will be less an outlier in a few short years.  Also, from my time in the software world, a few hundred thousand tracks is not a large index in the database community.  There are likely known approaches to greatly ameliorate or eliminate this issue, though I realize this may not be a priority and may be an ambitious undertaking. I looked on github and did not see any sort of design document.  Is there anything above the source code level to look at if someone wanted to suggest performance improvements?
Reply
#6
@soundof-ferns

Quote:Also, from my time in the software world, a few hundred thousand tracks is not a large index in the database community.

Very true, but the crux of the performance issue being discussed here isn't the database per se (and 'database' is itself a squidgy concept in MPD). 

Client performance is tied up with what's happening with the results of the DB operation. This involves the architecture of the WebUI, its implementing technologies, the choices made by the folks writing web browsers, and the resources on the device running the browser. You can track @swizzle's contributions in the moOde github repo, which might suggest specific areas to look at.

As an aside, all the browsers are moving targets. The rendering engines keep changing; the JavaScript engines keep changing; and the magical stuff the browser developers do with them keeps changing. 

Hence, what is true for a specific version of a specific browser today may not be true after it receives tomorrow's update. As an extreme if unrelated example, today for the first time ever I experienced a lock up and Linux memory dump, this while I was routinely browsing our github repository with a just updated Chromium browser on a Linux box. Yikes!

As to your last question, there's no design document I know of. From time to time I make private notes and sketches as I read the code but I never had the stamina to wrap them up nor the courage to impose them on others.  Maybe someone else can put their hand up.

Regards,
Kent
Reply


Forum Jump: