[Bug]: Podcast library page load time is very high #2564

Closed
opened 2026-04-25 00:08:26 +02:00 by adam · 5 comments
Owner

Originally created by @mikiher on GitHub (Feb 12, 2025).

What happened?

I am opening this as a sub-issue of #2073 (in which the general complaint was about slow loading library items post v2.4.0).

This issue should specifically address podcast library page load performance problems.

People who complained about have Audiobookshelf setups with the following characteristics:

  • Large podcast libraries (hundreds of podcasts, tens of thousands of episodes)
  • One user reports running on docker on relatively weak hardware (Synology 720+)
  • Load times go as high as 20-40 seconds per page load
  • Similar or higher load times are reported when scrolling down the library

What did you expect to happen?

Average and mean page load time for a typical page (~50 podcast per-page) should not exceed 200 ms.

Steps to reproduce the issue

  1. Open a large podcast library (100s of podcasts, 10000s of podcast episodes).
  2. Click on the Library page
  3. Page load slowly
  4. Scroll down
  5. Subsequent page also load slowly

Audiobookshelf version

v2.19.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Other (list in "Additional Notes" box)

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Other (list in "Additional Notes" box)

Logs


Additional Notes

Reported on Synology hardware.

Not browser-specific.

Originally created by @mikiher on GitHub (Feb 12, 2025). ### What happened? I am opening this as a sub-issue of #2073 (in which the general complaint was about slow loading library items post v2.4.0). This issue should specifically address **podcast library page load** performance problems. People who complained about have Audiobookshelf setups with the following characteristics: - Large podcast libraries (hundreds of podcasts, tens of thousands of episodes) - One user reports running on docker on relatively weak hardware (Synology 720+) - Load times go as high as 20-40 seconds per page load - Similar or higher load times are reported when scrolling down the library ### What did you expect to happen? Average and mean page load time for a typical page (~50 podcast per-page) should not exceed 200 ms. ### Steps to reproduce the issue 1. Open a large podcast library (100s of podcasts, 10000s of podcast episodes). 2. Click on the Library page 3. Page load slowly 4. Scroll down 5. Subsequent page also load slowly ### Audiobookshelf version v2.19.0 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Other (list in "Additional Notes" box) ### If the issue is being seen in the UI, what browsers are you seeing the problem on? Other (list in "Additional Notes" box) ### Logs ```shell ``` ### Additional Notes Reported on Synology hardware. Not browser-specific.
adam added the bug label 2026-04-25 00:08:26 +02:00
adam closed this issue 2026-04-25 00:08:26 +02:00
Author
Owner

@mikiher commented on GitHub (Feb 12, 2025):

Some observations:

  • It is hard to reproduce this with small podcast libraries
  • Looking at the main database queries supporting the podcast library page load:
    • they are somewhat similar to the book library page load queries, and likeky suffer from the same issues that were addressed in PR #3952
    • Yet there differences, especially with respect to numEpisodes and numEpisodesIncomplete which are obtained with very inefficient per-row sub-queries, which likely take much longer when there are many podcasts and podcast episodes.
  • @PhantomPhoton obseved that setting some pragma values improves query performance significantly (see #3750). @stelle007 observed similar query performance improvements after setting the same values.
    • These settings, which make better use of memory mapping and caching are likely good to always use as defaults or guidelines, especially on weak systems.
      • After some shallow inspection, these settings don't seem to boost performance on every system.
      • More investigation is required here.
    • While they improve performance through better use of resources, they don't resolve the core issues causing the queries to be inefficient
@mikiher commented on GitHub (Feb 12, 2025): Some observations: - It is hard to reproduce this with small podcast libraries - Looking at the main database queries supporting the podcast library page load: - they are somewhat similar to the book library page load queries, and likeky suffer from the same issues that were addressed in PR #3952 - Yet there differences, especially with respect to `numEpisodes` and `numEpisodesIncomplete` which are obtained with very inefficient per-row sub-queries, which likely take much longer when there are many podcasts and podcast episodes. - @PhantomPhoton obseved that setting some pragma values improves query performance significantly (see #3750). @stelle007 observed similar query performance improvements after setting the same values. - These settings, which make better use of memory mapping and caching are likely good to always use as defaults or guidelines, especially on weak systems. - After some shallow inspection, these settings don't seem to boost performance on every system. - More investigation is required here. - While they improve performance through better use of resources, they don't resolve the core issues causing the queries to be inefficient
Author
Owner

@github-actions[bot] commented on GitHub (Feb 20, 2025):

Fixed in v2.19.4.

@github-actions[bot] commented on GitHub (Feb 20, 2025): Fixed in [v2.19.4](https://github.com/advplyr/audiobookshelf/releases/tag/v2.19.4).
Author
Owner

@BlackHoleFox commented on GitHub (Feb 20, 2025):

Updated and was able to feel the difference on my older server right away 🎉. many thanks for your optimization work and time @mikiher in the most recent PR :)

@BlackHoleFox commented on GitHub (Feb 20, 2025): Updated and was able to feel the difference on my older server right away 🎉. many thanks for your optimization work and time @mikiher in the most recent PR :)
Author
Owner

@PhantomPhoton commented on GitHub (Feb 20, 2025):

I also just updated and it's a huge improvement! Thank you so very much @mikiher !

@PhantomPhoton commented on GitHub (Feb 20, 2025): I also just updated and it's a huge improvement! Thank you so very much @mikiher !
Author
Owner

@stelle007 commented on GitHub (Feb 20, 2025):

WOW, this is night and day. Thank you so much !!

@stelle007 commented on GitHub (Feb 20, 2025): WOW, this is night and day. Thank you so much !!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2564