Client SaaS
TypeScript
Issue Resolved
Issue #39 closed: Optimize data export polling with exponential backoff
Background
From PR #37 review - the privacy settings page polls every 5 seconds while a data export is in progress.
Problem
- Creates unnecessary server load
- Fixed 5-second interval is aggressive
- WebSocket notifications are already implemented but polling is still frequent
Suggested Implementation
Options to consider:
- Increase polling interval - 10-15 seconds instead of 5
- Exponential backoff - Start at 5s, then 10s, 20s, etc.
- WebSocket-only with polling fallback - Only poll if WebSocket connection fails
- Remove polling entirely - Rely solely on WebSocket notifications (already implemented)
Current Code
// resources/js/pages/settings/privacy.tsx
useEffect(() => {
if (!isExportInProgress) return;
const interval = setInterval(() => {
router.reload({ only: ['exportStatus'] });
}, 5000); // <-- 5 seconds
return () => clearInterval(interval);
}, [isExportInProgress]);
Priority
Low - Performance optimization, not a bug.
Labels
enhancement, performance