ML carbon emissions tracking
CodeCarbon performance optimizations
Profiled CodeCarbon's hot paths and shipped two rounds of optimizations — reducing unnecessary work in the measurement loop, file I/O, and CSV handling.
- #1219 — Eliminated unnecessary list allocation on every measurement tick
- #1235 — CSV header validation now reads one row instead of the entire file
Performance improvement: Avoid unnecessary GPU detail queries in _monitor_power()
The monitoring loop was querying detailed GPU info (memory, temperature, processes) every second — but only utilization was needed. Proposed a lightweight helper that skips the expensive calls.
- Avoids querying GPU memory, temperature, and process lists on every tick
- Saves dozens of NVML calls per second on multi-GPU systems


