Fetch feeds six ahead in a scan; reload the list only after a scan that checked something (#103, #104)
Fetching was 65-90% of a scan, each feed waiting for the one before: 13 s of fetches in a 20 s refresh of 32 feeds. The scan now works out which feeds are due, fetches their bodies up to six ahead in tasks of their own, and handles each in order as before, so database writes, downloads and OPML syncs stay one at a time. A Patreon creator still fetches in scan_one. The page reloaded /api/feeds, and /api/settings with it, on every scan_done: the scheduler scans every minute, so each open page reloaded the list once a minute, 169 times an hour. It now reloads only when the scan checked a feed, and asks for settings once, on first load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
/* ---------------- feeds ---------------- */
|
||||
async function loadFeeds(keepSel?: boolean){
|
||||
S.feeds = await api('/api/feeds');
|
||||
api('/api/settings').then(g=>{globalMax=g.max_new_per_check}).catch(()=>{});
|
||||
// Only for a hint in a feed's settings, so once, on the page's first load, not on every reload
|
||||
// of the list (#103).
|
||||
if(!keepSel) api('/api/settings').then(g=>{globalMax=g.max_new_per_check}).catch(()=>{});
|
||||
renderFeeds();
|
||||
// Land back where you were; a feed you no longer subscribe to, or a first visit, goes to
|
||||
// All Subscriptions rather than picking one alphabetically. Nothing to land on at all (a
|
||||
|
||||
Reference in New Issue
Block a user