Skip to content
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

fix memory spike and high cpu usage when getting playlists with podcasts #3614

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

drwggm
Copy link

@drwggm drwggm commented Nov 15, 2024

This might be related to #3015

  • I have a large number of podcasts, and some podcasts with a large number of episodes.
  • The current way podcasts are queried in playlists is very slow.
  • As far as I can tell, after looking up the libraryItemIds it grabs all episodes for any podcastIdin the playlist.
  • It only then filters the podcasts episodes contained in the playlist causing
  • Having so many podcasts episodes loaded everytime something is done with a playlist creates big memory spikes and cpu usage.

I do not know if this works for audiobooks, because I do not have a library to test it on, but it does seem to work for podcasts, so even if it breaks something hopefully it will give you some ideas on how to fix.

PS. I don't code JS, so apologies for messing up your codebase.

updated getAllOldLibraryItems to grab only the episodes in the playlist not every podcast episode from the podcast
@drwggm drwggm marked this pull request as ready for review November 15, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant