[Bug]: Slow iOS Browser Performance #2726

Open
opened 2026-04-25 00:09:57 +02:00 by adam · 0 comments
Owner

Originally created by @PulsarFTW on GitHub (Apr 24, 2025).

What happened?

I am seeing very long loading times when pressing the library option using Safari Browser on iPhone. Upwards of 30seconds. This does not occur on my android tablet, or desktop PC.

(additional details including videos: https://discord.com/channels/942908292873723984/942914154254176257/1364859834100617296)

What did you expect to happen?

Faster loading speed.

Steps to reproduce the issue

  1. Use a "large" library (~4500 items)
  2. Log in via safari browser on iPhone 13 Pro
  3. Click the library tab and wait.

Audiobookshelf version

2.20.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

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

Safari on iOS

Logs

Desktop Firefox (Loads Instantly):
2025-04-24 07:53:54.867 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb?include=filterdata"}
2025-04-24 07:53:55.043 DEBUG [ApiCacheManager] count: 10 size: 701451
2025-04-24 07:53:55.049 DEBUG [LibraryItemsBookFilters] countCacheKey: {"where":{"0":{}},"distinct":true,"attributes":null,"replacements":{},"include":{"0":{"model":"libraryItem","required":true,"where":{"libraryId":"e2c360a4-cb7a-4e89-9361-f2fa63eb27eb"},"include":{"0":{"model":"feed","required":false,"separate":true}}},"1":{"model":"bookSeries","attributes":{"0":"id","1":"seriesId","2":"sequence","3":"createdAt"},"include":{"model":"series","attributes":{"0":"id","1":"name","2":"nameIgnorePrefix"}},"order":{"0":{"0":"createdAt","1":"ASC"}},"separate":true},"2":{"model":"bookAuthor","attributes":{"0":"authorId","1":"createdAt"},"include":{"model":"author","attributes":{"0":"id","1":"name"}},"order":{"0":{"0":"createdAt","1":"ASC"}},"separate":true}},"order":{"0":{"0":{"val":"libraryItem.createdAt"},"1":"DESC"}},"subQuery":false}
2025-04-24 07:53:55.151 DEBUG Loaded 48 of 4519 items for libary page in 0.10s
2025-04-24 07:53:55.155 DEBUG [ApiCacheManager] Cache miss: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb/items?sort=addedAt&desc=1&limit=48&page=0&minified=1&include=rssfeed,numEpisodesIncomplete,share"}


Android Tablet - Firefox Broswer (Loads instantly)
2025-04-24 07:56:03.929 DEBUG [ApiCacheManager] count: 11 size: 808496
2025-04-24 07:56:03.930 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb?include=filterdata"}
2025-04-24 07:56:04.163 DEBUG [ApiCacheManager] count: 11 size: 808496
2025-04-24 07:56:04.163 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb/items?sort=media.metadata.title&desc=0&limit=63&page=0&minified=1&include=rssfeed,numEpisodesIncomplete,share"}
2025-04-24 07:56:04.562 DEBUG [ApiCacheManager] count: 11 size: 808496
2025-04-24 07:56:04.563 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb/items?sort=media.metadata.title&desc=0&limit=63&page=1&minified=1&include=rssfeed,numEpisodesIncomplete,share"}


iOS iPhone 13PM - Safari Browser (Longer than 10s to initial displaying of books)
2025-04-24 07:58:09.865 DEBUG [ApiCacheManager] count: 11 size: 808496
2025-04-24 07:58:09.866 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb?include=filterdata"}
2025-04-24 07:58:10.168 DEBUG [ApiCacheManager] count: 11 size: 808496
2025-04-24 07:58:10.169 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb/items?sort=media.metadata.title&desc=0&limit=6&page=0&minified=1&include=rssfeed,numEpisodesIncomplete,share"}



iOS iPhone 13PM - Safari Browser after changing book size to 60 down from the 120 default (much faster)
2025-04-24 08:42:38.658 DEBUG [ApiCacheManager] count: 7 size: 383051
2025-04-24 08:42:38.659 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb?include=filterdata"}
2025-04-24 08:42:39.353 DEBUG [ApiCacheManager] count: 7 size: 383051
2025-04-24 08:42:39.354 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb/personalized?include=rssfeed,numEpisodesIncomplete,share"}
2025-04-24 08:42:46.624 DEBUG [ApiCacheManager] count: 7 size: 383051
2025-04-24 08:42:46.624 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb?include=filterdata"}
2025-04-24 08:42:46.884 DEBUG [ApiCacheManager] count: 7 size: 383051
2025-04-24 08:42:46.885 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb/items?sort=media.metadata.title&desc=0&limit=27&page=0&minified=1&include=rssfeed,numEpisodesIncomplete,share

Additional Notes

I have restarted the docker container, I have accessed the site directly via local IP and not through any reverse proxy or other intermediate. I have cleared cookies and cache on my iOS browser, and have tried Safari and Orion (however both use the safari engine underneath)

When I change the icon size to the smallest size, safari is loading 27 items at a time, rather than 6. This is significantly faster for the initial load and scrolling. I am unsure why loading more items is faster.

Originally created by @PulsarFTW on GitHub (Apr 24, 2025). ### What happened? I am seeing very long loading times when pressing the library option using Safari Browser on iPhone. Upwards of 30seconds. This does not occur on my android tablet, or desktop PC. (additional details including videos: https://discord.com/channels/942908292873723984/942914154254176257/1364859834100617296) ### What did you expect to happen? Faster loading speed. ### Steps to reproduce the issue 1. Use a "large" library (~4500 items) 2. Log in via safari browser on iPhone 13 Pro 3. Click the library tab and wait. ### Audiobookshelf version 2.20.0 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? Safari on iOS ### Logs ```shell Desktop Firefox (Loads Instantly): 2025-04-24 07:53:54.867 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb?include=filterdata"} 2025-04-24 07:53:55.043 DEBUG [ApiCacheManager] count: 10 size: 701451 2025-04-24 07:53:55.049 DEBUG [LibraryItemsBookFilters] countCacheKey: {"where":{"0":{}},"distinct":true,"attributes":null,"replacements":{},"include":{"0":{"model":"libraryItem","required":true,"where":{"libraryId":"e2c360a4-cb7a-4e89-9361-f2fa63eb27eb"},"include":{"0":{"model":"feed","required":false,"separate":true}}},"1":{"model":"bookSeries","attributes":{"0":"id","1":"seriesId","2":"sequence","3":"createdAt"},"include":{"model":"series","attributes":{"0":"id","1":"name","2":"nameIgnorePrefix"}},"order":{"0":{"0":"createdAt","1":"ASC"}},"separate":true},"2":{"model":"bookAuthor","attributes":{"0":"authorId","1":"createdAt"},"include":{"model":"author","attributes":{"0":"id","1":"name"}},"order":{"0":{"0":"createdAt","1":"ASC"}},"separate":true}},"order":{"0":{"0":{"val":"libraryItem.createdAt"},"1":"DESC"}},"subQuery":false} 2025-04-24 07:53:55.151 DEBUG Loaded 48 of 4519 items for libary page in 0.10s 2025-04-24 07:53:55.155 DEBUG [ApiCacheManager] Cache miss: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb/items?sort=addedAt&desc=1&limit=48&page=0&minified=1&include=rssfeed,numEpisodesIncomplete,share"} Android Tablet - Firefox Broswer (Loads instantly) 2025-04-24 07:56:03.929 DEBUG [ApiCacheManager] count: 11 size: 808496 2025-04-24 07:56:03.930 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb?include=filterdata"} 2025-04-24 07:56:04.163 DEBUG [ApiCacheManager] count: 11 size: 808496 2025-04-24 07:56:04.163 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb/items?sort=media.metadata.title&desc=0&limit=63&page=0&minified=1&include=rssfeed,numEpisodesIncomplete,share"} 2025-04-24 07:56:04.562 DEBUG [ApiCacheManager] count: 11 size: 808496 2025-04-24 07:56:04.563 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb/items?sort=media.metadata.title&desc=0&limit=63&page=1&minified=1&include=rssfeed,numEpisodesIncomplete,share"} iOS iPhone 13PM - Safari Browser (Longer than 10s to initial displaying of books) 2025-04-24 07:58:09.865 DEBUG [ApiCacheManager] count: 11 size: 808496 2025-04-24 07:58:09.866 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb?include=filterdata"} 2025-04-24 07:58:10.168 DEBUG [ApiCacheManager] count: 11 size: 808496 2025-04-24 07:58:10.169 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb/items?sort=media.metadata.title&desc=0&limit=6&page=0&minified=1&include=rssfeed,numEpisodesIncomplete,share"} iOS iPhone 13PM - Safari Browser after changing book size to 60 down from the 120 default (much faster) 2025-04-24 08:42:38.658 DEBUG [ApiCacheManager] count: 7 size: 383051 2025-04-24 08:42:38.659 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb?include=filterdata"} 2025-04-24 08:42:39.353 DEBUG [ApiCacheManager] count: 7 size: 383051 2025-04-24 08:42:39.354 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb/personalized?include=rssfeed,numEpisodesIncomplete,share"} 2025-04-24 08:42:46.624 DEBUG [ApiCacheManager] count: 7 size: 383051 2025-04-24 08:42:46.624 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb?include=filterdata"} 2025-04-24 08:42:46.884 DEBUG [ApiCacheManager] count: 7 size: 383051 2025-04-24 08:42:46.885 DEBUG [ApiCacheManager] Cache hit: {"user":"PulsarFTW","url":"/libraries/e2c360a4-cb7a-4e89-9361-f2fa63eb27eb/items?sort=media.metadata.title&desc=0&limit=27&page=0&minified=1&include=rssfeed,numEpisodesIncomplete,share ``` ### Additional Notes I have restarted the docker container, I have accessed the site directly via local IP and not through any reverse proxy or other intermediate. I have cleared cookies and cache on my iOS browser, and have tried Safari and Orion (however both use the safari engine underneath) When I change the icon size to the smallest size, safari is loading 27 items at a time, rather than 6. This is _significantly_ faster for the initial load and scrolling. I am unsure why loading more items is faster.
adam added the bug label 2026-04-25 00:09:57 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2726