💡 What:
- Implemented Gzip compression in `scripts/web_dashboard.py` using `gzip` and `io` standard libraries.
- Added `@app.after_request` handler to compress responses > 500 bytes with compatible content types.
- Added `test_gzip_compression` to `scripts/test_web_dashboard.py`.
🎯 Why:
- The web dashboard serves large HTML content (~27KB).
- Without compression, this payload is sent fully, wasting bandwidth and increasing load time.
📊 Impact:
- Reduces response size by ~66% (from ~27KB to ~9.2KB).
- Improves page load performance and reduces bandwidth usage.
🔬 Measurement:
- Verified with `curl -H "Accept-Encoding: gzip"`: `Content-Encoding: gzip` present and `Content-Length` reduced.
- Verified with `python scripts/test_web_dashboard.py`.
💡 What: Separated the /health endpoint from the main dashboard rendering logic. It now returns a lightweight JSON response.
🎯 Why: The previous implementation rendered the full Markdown dashboard for every health check, consuming unnecessary CPU and I/O resources during frequent polling.
📊 Impact: Reduces health check processing time from file reading + markdown parsing (~milliseconds) to a simple JSON return (~microseconds).
🔬 Measurement: Verified with new test script scripts/test_web_dashboard.py and updated render.yaml/app.yaml to use the new endpoint.