Skip to content

Library loads extremely slowly on large collections (All Albums / All Songs) #119

@dexsper

Description

@dexsper

Bug Description

Opening "All Albums" or "All Songs" for the first time (or after cache expires) can take several minutes on large libraries. The root cause is _refreshAllDataInBackground() in LibraryProvider, which fetches the entire library via hundreds of sequential HTTP requests:

  1. getArtists() — 1 request
  2. getArtistAlbums(id) — 1 request per artist, sequentially
  3. getAlbumSongs(id) — 1 request per album, sequentially

On a collection of ~500 albums across ~200 artists this results in 700+ sequential API calls, blocking the screen for minutes.

Additionally, _onScroll() in AllSongsScreen is defined but empty — there is no lazy/paginated loading once the screen opens.

Steps to Reproduce

  1. Fresh install or cache older than 6 hours
  2. Connect to a Subsonic/Navidrome server with 200+ albums
  3. Open Library → All Albums or All Songs
  4. Observe loading spinner that can take 2–5+ minutes before any content appears

Expected Behavior

Albums and songs should appear quickly using paginated API calls (getAlbumList2 supports size + offset).
Content should load incrementally as the user scrolls rather than waiting for the entire library to be fetched upfront.

App Version

v1.0.8

Subsonic Server

Navidrome

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions