mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-04-07 08:03:40 +00:00
- Move UTC import from inline (inside _has_real_gaps_in_range) to module-level in manager.py - Hoist get_fetch_groups() out of while loop in _get_cached_intervals: eliminates ~384 function calls per invocation - Pre-compute criteria_by_day dict in build_periods before the for-loop: eliminates ~381 redundant NamedTuple constructions per call; only ref_price/avg_price vary by day (max 3 entries), flex/min_distance/ reverse_sort are constant throughout Impact: Reduces unnecessary object creation during the hot paths called every 15 minutes and during all relaxation phases. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| cache.py | ||
| fetcher.py | ||
| garbage_collector.py | ||
| index.py | ||
| manager.py | ||
| routing.py | ||
| storage.py | ||