Python backend optimizations:
- Add statistics incremental cache (O(1) when data unchanged)
- Add time parsing cache (dict cache, max 512 entries)
- Add AMS entity ID cache (avoid full entity scan every 60s)
- Add storage dirty flag (only write changed year files)
- Fix nested executor in StorageManager._save_year_data
- Optimize year extraction: regex -> string slice
- Move placeholder image detection to executor
- Optimize sensor JSON truncation: binary search -> estimation
- Add 24h safety limit to snapshot download loop
- Remove 8 delegate methods from Coordinator
- Add vol.Schema validation to all 6 services
- Unify INVALID_ENTITY_STATES to const.py
- Remove BOM from all Python files
- Fix energy_kwh: typo in conftest.py
- Unify manifest.json version to 5.8.3
Frontend JS optimizations:
- Extract CSS to constant, inject only once in connectedCallback
- Add merged records cache + shallow copy (no data mutation)
- Add aggregated stats cache (3 traversals -> 1)
- Unify status mapping to STATUS_CONFIG static constant
- Unify time formatting to _formatDateTime method
- Optimize _escapeHtml: DOM creation -> string replace
- Delete 3 dead code methods (_downsampleData, _renderFilamentUsage, _renderLifetimeStats)
- Remove BOM from JS file