[Bug]: Slow loading playlists #1886

Closed
opened 2026-04-25 00:00:57 +02:00 by adam · 8 comments
Owner

Originally created by @fuzzy-idea on GitHub (Apr 15, 2024).

Describe the issue

Playlists are taking 15+ seconds to load. This occurs when selecting the playlists tab to view the list of playlists and when clicking the button to add a podcast episode a playlist (both loading the list of playlist and after adding the episode to a playlist). I am seeing this when connecting to the web app from a desktop and from the mobile app with even just a single playlist created.

I tested v2.7.2 and v.2.8.1 and have the issue with both versions. The podcast library does not have this slow loading issue. I reverted to v.2.3.3 which does not have this issue; playlists load almost instantly.

Steps to reproduce the issue

  1. Audiobookshelf installed on docker (podcast and audiobook volumes on network share, config and metadata volumes local on SSD)
  2. Click the "Your Playlists" button on a podcast episode or click the playlists tab

Audiobookshelf version

2.8.1

How are you running audiobookshelf?

Docker

Originally created by @fuzzy-idea on GitHub (Apr 15, 2024). ### Describe the issue Playlists are taking 15+ seconds to load. This occurs when selecting the playlists tab to view the list of playlists and when clicking the button to add a podcast episode a playlist (both loading the list of playlist and after adding the episode to a playlist). I am seeing this when connecting to the web app from a desktop and from the mobile app with even just a single playlist created. I tested v2.7.2 and v.2.8.1 and have the issue with both versions. The podcast library does not have this slow loading issue. I reverted to v.2.3.3 which does not have this issue; playlists load almost instantly. ### Steps to reproduce the issue 1. Audiobookshelf installed on docker (podcast and audiobook volumes on network share, config and metadata volumes local on SSD) 2. Click the "Your Playlists" button on a podcast episode or click the playlists tab ### Audiobookshelf version 2.8.1 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-25 00:00:57 +02:00
adam closed this issue 2026-04-25 00:00:57 +02:00
Author
Owner

@advplyr commented on GitHub (Apr 15, 2024):

Roughly how many playlists do you have and how big are they? Just rough estimates so I can simulate it.

@advplyr commented on GitHub (Apr 15, 2024): Roughly how many playlists do you have and how big are they? Just rough estimates so I can simulate it.
Author
Owner

@fuzzy-idea commented on GitHub (Apr 15, 2024):

This was about 6 playlists, all with one or two episodes except the one I was intentionally trying to load that had about 30 episodes. It was painful enough that I stopped at that point.

@fuzzy-idea commented on GitHub (Apr 15, 2024): This was about 6 playlists, all with one or two episodes except the one I was intentionally trying to load that had about 30 episodes. It was painful enough that I stopped at that point.
Author
Owner

@nichwall commented on GitHub (Apr 15, 2024):

About how many podcasts and podcast episodes do you have? I just added podcast episodes to a playlist and didn't notice a slowdown between adding the first episode and the 10th episode using the Android app using server version 2.8.0

I have 14 podcasts with ~850 episodes total (pretty even spread, largest podcast has 200 episodes)

@nichwall commented on GitHub (Apr 15, 2024): About how many podcasts and podcast episodes do you have? I just added podcast episodes to a playlist and didn't notice a slowdown between adding the first episode and the 10th episode using the Android app using server version 2.8.0 I have 14 podcasts with ~850 episodes total (pretty even spread, largest podcast has 200 episodes)
Author
Owner

@fuzzy-idea commented on GitHub (Apr 16, 2024):

I have 14 podcasts with 3800 episodes total. The largest three podcasts have 500-1000 episodes and the rest are under 200. There is no slowdown in loading the library itself or individual podcasts, only playlists.

@fuzzy-idea commented on GitHub (Apr 16, 2024): I have 14 podcasts with 3800 episodes total. The largest three podcasts have 500-1000 episodes and the rest are under 200. There is no slowdown in loading the library itself or individual podcasts, only playlists.
Author
Owner

@xcy7e commented on GitHub (May 20, 2024):

Having the same issue with playlists and collections. My Audio files are also located on a network drive, metadata stored centralized locally on SSD. Listing playlists/collections is very slow: ~10-30 sec.

Time to load the list of playlists/collections is increasing by the amount of books related, but takes overly long initially with only very few collections/books.

I reviewed the code - it seems to load all related books to display the list of playlists/collections.
Maybe it's a good idea to just load the first n (2?) books, for each collection, that are needed to display the covers.
Or giving a switch in the settings to disable dynamic cover display in the list of playlists/collections for increased performance?

Roughly 10 collections, each having 5-60 books related.

Having only 1 playlist with 100 books takes evenly long as the collections.

@xcy7e commented on GitHub (May 20, 2024): Having the same issue with playlists and collections. My Audio files are also located on a network drive, metadata stored centralized locally on SSD. Listing playlists/collections is very slow: ~10-30 sec. Time to load the list of playlists/collections is increasing by the amount of books related, but takes overly long initially with only very few collections/books. I reviewed the code - it seems to load *all* related books to display the list of playlists/collections. **Maybe it's a good idea to just load the first *n* (2?) books**, for each collection, that are needed to display the covers. Or giving a switch in the settings to *disable dynamic cover display* in the list of playlists/collections for increased performance? Roughly 10 collections, each having 5-60 books related. Having only 1 playlist with 100 books takes evenly long as the collections.
Author
Owner

@BrianCArnold commented on GitHub (May 26, 2024):

I'm investigating this as well.

The primary issue seems to be that when you're loading the list of playlists, it includes all items in all playlists, rather than merely enough to render the thumbnail for each playlist.

So when you have a 4 playlists of 100 items each, it has to send all the information for 400 books.

While we obviously need to get the entire playlist when we're looking at a single playlist, I don't think there's much of a reason to send back every entire playlist when we're just looking at the list of the playlists.

I'm going to see if there's a simple modification to the server code to just send back upto first 4 books of each playlist.

@BrianCArnold commented on GitHub (May 26, 2024): I'm investigating this as well. The primary issue seems to be that when you're loading the list of playlists, it includes _all_ items in _all_ playlists, rather than merely enough to render the thumbnail for each playlist. So when you have a 4 playlists of 100 items each, it has to send all the information for 400 books. While we obviously need to get the entire playlist when we're looking at a single playlist, I don't think there's much of a reason to send back every entire playlist when we're just looking at the list of the playlists. I'm going to see if there's a simple modification to the server code to just send back upto first 4 books of each playlist.
Author
Owner

@BrianCArnold commented on GitHub (May 26, 2024):

On my library with collections and playlists, #3015 fixes the issue, though I don't know the entire code base well enough to be able to tell if it breaks something somewhere else. Needs review and testing.

@BrianCArnold commented on GitHub (May 26, 2024): On my library with collections and playlists, #3015 fixes the issue, though I don't know the entire code base well enough to be able to tell if it breaks something somewhere else. Needs review and testing.
Author
Owner

@advplyr commented on GitHub (May 27, 2024):

Updated in v2.10.1

There are still improvements that can be made but they may wait until playlists are switched to the new data model.

@advplyr commented on GitHub (May 27, 2024): Updated in [v2.10.1](https://github.com/advplyr/audiobookshelf/releases/tag/v2.10.1) There are still improvements that can be made but they may wait until playlists are switched to the new data model.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1886