Notifications slow to load
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 186
- Avg merge
- 1d 36m
- Merged PRs (30d)
- 11
Description
I'm finding notifications very slow to load (first time in a session) or to refresh.
Looking into it, the request to `/api/v1/notifications?limit=80&exclude_types[]=follow_request` averages about 3 seconds on my primary instance, and about 1 second on my alt on a different instance. (It's returning about 500kB of data, ~180kB of which is copies of my own profile attached to every reblog and favourite notification.)
Maybe this is a server tuning issue or an inefficient Mastodon API design issue, and maybe server-side batching of notifications will make this better, but... I also wonder why Phanpy requests 80 notifications every time I open the notifications tab. Couldn't it only request the new ones? Also, could the initial set of notifications be requested eagerly when I open Phanpy (Mastodon web does this, so notifs feel faster), and new ones requested in the background as they become available through the streaming API?
- Which site: phanpy.social
- Which site version: 2024.08.08.dabb480
- Which instance: mainly carfree.city
**To Reproduce**
1. Open Phanpy
2. Click on profile pic with blue circle in top left
3. Click on Notifications
4. Wait a long time
**Expected behavior**
Notifications show up pretty fast or immediately
**Desktop (please complete the following information):**
- OS: Linux
- Browser: Firefox
- Version: 129
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.