-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iris is slow on browsing mopidy-dleyna content, cause it to throw some exceptions and wrongly assign current folder name #659
Comments
if I change the get_images method of the mopidy-dleyna LibraryProvider to:
then the isris is usable to browse and play music from my dlna server (of course no album covers visible). But still have an issue with current folder name and is a bit slower (0.5 sec) than the musicbox_webclient. |
s/PlaylistsProvider/LibraryProvider/ ? |
no, LibraryProvider is responsible for browsing feature. |
OMG YES !!!! :D |
Hmm, I think that with get_images there is also another issue, Iris is requesting images for folders (albums) and for for tracks it does not. With musicbox_weblient it is another way around, it requests for images from tracks (actualy only the first track in te album and sets it as the album cover). |
Good spotting. The thing to bear in mind that Iris is a feature-rich interface. There will be times that it might be slower than simple frontends. This touches on something that I've been trying to wrap my brain around for some time. Why bother getting metadata for items (ie Albums, Playlists, etc) that aren't being displayed on screen? Also, when displaying a huge list (ie Playlist with 5,000 tracks) the interface renders them all, making lower-powered computers struggle. But how does this work with remembering scroll position? My ideal plan is to have grid and list items render only what is being displayed (like a React Native's Flatlist). This could be used to trigger artwork lookups as needed, and only for the displayed items. There are plugins around, but none that are a perfect fit, so it will be a large project. I think this is the way to approach fixing the issue you've raised, especially given |
I've been exploring some options, but the issue I keep coming back to is that Mopidy-Dleyna is just slow! The next release breaks down the sequence of lookups/browsing and attempts to reduce unnecessary calls, but there is only so much patching a frontend can do to resolve the backend performance. FYI: the biggest issue with Mopidy-Dleyna is that |
I don't use Mopidy-Dleyna but having just installed it I don't see this. Do I misunderstand or could it be dependent on what your DLNA server implements? I'm using minidlna here:
EDIT: It looks like it needs to use a DLNA search for looking up non-track objects. I did a quick web search and it seems not every DLNA server supports "remote search". |
Hmm I hadn't considered that. I am using the built-in DLNA server that comes with Synology NAS. I guess this is just another variable that makes testing difficult. |
@mczerski how is the latest release (3.57) working for you? Iris now prefers |
@jaedb sorry but I switched to local backend + samba because it works much better. If I find some time I will test new iris against mopidy dleyna and report back. |
No worries. I'll mark this as resolved in the meantime. Please re-open with your findings if the issue persists. |
Hi @jaedb . I tested a little bit new Iris release (3.57). The current behaviour is that after going into: browse -> Digital media servers -> my server name, all tracks of the media server are displayed in a flat list. Is this by the design ? The previous begaviour was to display folder structure defined by the media server (the one I described in the first post in this issue). Is this by the design ? Currently it works fast and reliably but having all tracks of the media server in one flat list may be not very usable. |
I'm comparing behaviour of the Iris and musicbox_webclient during browsing mopidy-dleyna library content. I have quite large collection of artists and albums on my NAS that exposes its content trough DLNA.
The structure of the library is like this (the folder level is denotet as indentation):
The result of comparison is that musicbox_webclient is blasing fast and does not make any issues, while Iris is very slow and causes some exceptions rasing in mopiyd-dleyna backend (this is propably issue in mopidy-dleyna itself).
I put some debug logs into mopidy-dleyna to see what kind of LibraryProvider actions are triggered while stepping trough the folders.
For example entering the first level of folders (the one with MUSIC, PHOTOS, VIDEOS) I see that Iris is sending theese requests:
mopidy.backend.LibraryProvider.lookup
mopidy.backend.LibraryProvider.browse
mopidy.backend.LibraryProvider.get_images
While musicbox_webclient only:
mopidy.backend.LibraryProvider.browse
in the case of Iris, mopidy.backend.LibraryProvider.lookup takes 0.5s which is 20x longer that mopidy.backend.LibraryProvider.browse and it makes mopidy-dleyna to fetch list of metadata of all the music content on the NAS (i think).
And the name of the current folder (the name at the bottom) is set to the name of the album of the first item in the fetched list, which is not what the current folder is (Should be the name of the dlna server ?)
mopidy.backend.LibraryProvider.get_images is taking more than 10s but it seems that it is done in the background so it is not the issue. But calling this request at the root of mopidy-dleyna browsing library (where the list of dlna servers should be) causes mopidy-dleyna to raise an exception:
In contrast, musicbox_webclient is calling only browse while entering the folder of folders, and when entering the folder of tracks (album) it calls lookup for all files in the folder (one lookup for single file), and get_images for the album.
It seems like fetching metadata of all the audio tracks for every folder level is not necesary and is causing noticable delay. also calling get_images for resources that are not albums also seems not necesarry. At least for my nas server fetching images is very long > 10s.
The other issue with get_images is that I think that to enter next folder level, Iris is waiting for the current level to finish fetching images. So I cannot step trough folders quickly. For example when I go into the Albums folder where there are all of the albums I have, then fetching all the albums images takes very very long and Iris frontend is rising timeout errors:
To Reproduce
Expected behavior
stepping trough the mopidy-dleyna library folders being fast and not crashing the browsing feature
Environment details:
The text was updated successfully, but these errors were encountered: