Public charger and connector performance notes

Dashboard view

  • The dashboard view fetches each charger's latest transaction individually when it isn't already cached, leading to an N+1 query pattern across the visible chargers list. Collecting the latest transaction IDs with a subquery or prefetch would trim redundant queries during dashboard refreshes and partial table renders.
  • Per-charger energy stats (total_kw and total_kw_for_range) are computed inside the dashboard loop. Batch annotations for the current day and lifetime totals (or caching a daily summary) would avoid repeating aggregations for every connector on each request.
Loading remaining sections…