(endpoint, options = {})
| 11662 | // OPTIMIZATION: Reduce dashboard refresh frequency (was 15s, now 20s) |
| 11663 | // Background sync runs every 15s, so 20s refresh is sufficient |
| 11664 | autoRefreshIntervals.dashboard = setInterval(() => { |
| 11665 | if (currentTab === 'dashboard') { |
| 11666 | loadDashboardData(); |
| 11667 | } |
| 11668 | }, 20000); // Every 20 seconds when on dashboard (reduced from 15s) |
| 11669 | |
| 11670 | // Set up periodic update checking |
| 11671 | autoRefreshIntervals.updates = setInterval(() => { |
| 11672 | checkForUpdatesQuiet(); |
| 11673 | }, 300000); // Every 5 minutes |
| 11674 | |
| 11675 | // OPTIMIZATION: Defer initial update check (was 5s, now 30s) |
| 11676 | // Not critical for initial dashboard load |
| 11677 | setTimeout(() => { |
| 11678 | checkForUpdatesQuiet(); |
| 11679 | }, 30000); // Check 30 seconds after page load (deferred from 5s) |
| 11680 | |
| 11681 | // Flag the Files nav when a file has been sent to this unit's Inbox. |
| 11682 | autoRefreshIntervals.filesFlag = setInterval(refreshFilesFlag, 20000); // every 20s |
no test coverage detected