perf: add compression and caching for faster public access
Deploy Dashboard (Dev) / deploy-dev (push) Successful in 2m20s
Deploy Dashboard (Dev) / deploy-dev (push) Successful in 2m20s
Optimizations to reduce latency over Tailscale tunnel: - Add GZip middleware for 70% bandwidth reduction (480KB → ~150KB) - Cache static assets with immutable headers (1 year) - Remove 500ms blocking CPU interval in system stats These changes significantly improve dashboard load time over public network. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -39,7 +39,7 @@ def system_stats():
|
||||
except Exception:
|
||||
pass
|
||||
mem = psutil.virtual_memory()
|
||||
cpu_pct = psutil.cpu_percent(interval=0.5)
|
||||
cpu_pct = psutil.cpu_percent(interval=0) # Non-blocking, uses cached value
|
||||
load_1, load_5, load_15 = psutil.getloadavg()
|
||||
uptime_s = time.time() - psutil.boot_time()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user