Skip to content

Release v0.0.4

Latest

Choose a tag to compare

@full-bars full-bars released this 08 Jul 06:03
87a5c5e

v0.0.4 🧹 Performance, Correctness & Pruning

Important

Network total graph now shows 30 days. The LIMIT was too aggressive β€” 720 rows at 15-min intervals only covered 7.5 days. Upped to 2880 rows.

🐍 Python Backend

  • movers endpoint β€” Was using a single global timestamp instead of per-country lookups. Fixed with per-country subqueries.
  • comparison endpoint β€” Had no LIMIT, could return 35K+ rows. Now capped at 720.
  • query_trends β€” Parameterized the SQL instead of f-string interpolation.

πŸ¦€ Rust Backend

  • movers_detailed β€” ~3000 individual queries per request. Now batches each window into one query.
  • at_risk β€” Same N+1 pattern. Batched into one query.
  • country_stats β€” Was fetching 6 hours of data (24 rows). Now fetches 96 rows for full 24h volatility.
  • 24h moving average β€” Integer division was truncating. Now uses float division with rounding.

⏰ Pruning

  • prune_old_data.py β€” Referenced in crontab for years but never existed. Created it.

πŸ–₯️ Frontend

  • setInterval leak β€” Every refresh spawned a new timer. ~288 redundant timers after 24h. Now clears properly.
  • Volatility API calls β€” 100 individual requests per page load. Removed live volatility from mover tables.
  • Timezone staleness β€” Poll freshness compared UTC vs local browser time. Now uses consistent UTC math.

πŸ”§ Poller

  • JWT error handling β€” Missing/empty token now logs a clear error instead of failing silently.