Severity: medium
Category: performance
A refresh interval of 0 currently means "update on every scheduler tick" instead of "self-managed / no polling".
Evidence:
src/main.ts:80 registers TrafficLayer with interval 0.
src/main.ts:85 registers PlacesLayer with interval 0.
src/layers/layer-manager.ts:93-98 runs layer.update() whenever now - meta.lastUpdate >= meta.interval, which is always true for 0.
src/layers/places-layer.ts:91-118 performs a live nearby-places API request inside update().
Impact:
- self-managed layers still poll every 5 seconds
- this burns API quota and increases rate-limit risk while the app is idle
- unnecessary requests also add avoidable UI and network churn
Recommended fix:
- treat
0 or negative intervals as manual-only and skip them in the scheduler
- or add an explicit auto-refresh flag instead of overloading the interval value
Severity: medium
Category: performance
A refresh interval of
0currently means "update on every scheduler tick" instead of "self-managed / no polling".Evidence:
src/main.ts:80registersTrafficLayerwith interval0.src/main.ts:85registersPlacesLayerwith interval0.src/layers/layer-manager.ts:93-98runslayer.update()whenevernow - meta.lastUpdate >= meta.interval, which is always true for0.src/layers/places-layer.ts:91-118performs a live nearby-places API request insideupdate().Impact:
Recommended fix:
0or negative intervals as manual-only and skip them in the scheduler