fix: limit history pagination to prevent 40s response times
The full pagination fix (ddad80a,e772001) caused history retrieval to fetch up to 50 pages sequentially, taking 10-40 seconds instead of ~200ms. Changes: - Add maxPages parameter to getHistory() with default of 1 page - Update poller to fetch 50 records (up from 10) in a single API call - historyFetcher retains 100 records per page for UI display This provides 5x more history for matching than before while keeping the fast single-request performance. Refs: develop-merge pagination performance issue
This commit is contained in:
@@ -118,7 +118,7 @@ async function pollAllServices() {
|
||||
return queuesByType.sonarr || [];
|
||||
}) : timed('Sonarr Queue', async () => []),
|
||||
shouldPollSonarr ? timed('Sonarr History', async () => {
|
||||
const historyByType = await arrRetrieverRegistry.getHistoryByType({ pageSize: 10 });
|
||||
const historyByType = await arrRetrieverRegistry.getHistoryByType({ pageSize: 50 });
|
||||
return historyByType.sonarr || [];
|
||||
}) : timed('Sonarr History', async () => []),
|
||||
shouldPollRadarr ? timed('Radarr Queue', async () => {
|
||||
@@ -126,7 +126,7 @@ async function pollAllServices() {
|
||||
return queuesByType.radarr || [];
|
||||
}) : timed('Radarr Queue', async () => []),
|
||||
shouldPollRadarr ? timed('Radarr History', async () => {
|
||||
const historyByType = await arrRetrieverRegistry.getHistoryByType({ pageSize: 10 });
|
||||
const historyByType = await arrRetrieverRegistry.getHistoryByType({ pageSize: 50 });
|
||||
return historyByType.radarr || [];
|
||||
}) : timed('Radarr History', async () => []),
|
||||
shouldPollRadarr ? timed('Radarr Tags', async () => {
|
||||
|
||||
Reference in New Issue
Block a user