Private
Public Access
0
0
Files
manual_slop/src
ed 69d098baaa refactor(theme_2): remove top-level NERV theme imports; use _require_warmed
Phase 5B of startup_speedup_20260606 track.

src/theme_2.py had 3 top-level NERV imports:
  from src import theme_nerv
  from src.theme_nerv import DATA_GREEN
  from src.theme_nerv_fx import CRTFilter, AlertPulsing, StatusFlicker

And 3 module-level FX object instantiations:
  _crt_filter     = CRTFilter()
  _alert_pulsing  = AlertPulsing()
  _status_flicker = StatusFlicker()

ALL removed. The 3 use sites now lookup via _require_warmed:
- apply() NERV branch: theme_nerv = _require_warmed('src.theme_nerv')
- ai_text_color(): theme_nerv = _require_warmed('src.theme_nerv')
  (then uses theme_nerv.DATA_GREEN)
- render_post_fx(): theme_nerv_fx = _require_warmed('src.theme_nerv_fx')
  (then creates FX objects locally per-call)

The _status_flicker was instantiated but never used (dead code path;
the StatusFlicker class is still importable via theme_nerv_fx but not
auto-constructed in theme_2.py).

TESTS:
- tests/test_theme_2_no_top_level_nerv.py: 4/4 PASS (all RED -> GREEN)
- tests/test_theme.py, test_theme_nerv.py, test_theme_nerv_fx.py,
  test_theme_models.py: 21/21 PASS (no breakage)

EFFECTIVENESS: import src.theme_2 no longer triggers src.theme_nerv or
src.theme_nerv_fx (~485ms combined). For users on default theme, these
are NEVER loaded. For NERV users, the warmup pre-loads on _io_pool and
the lookup is O(1).

NEXT: Phase 5C (markdown table) follows same TDD pattern.
2026-06-06 16:55:20 -04:00
..
2026-06-05 22:34:26 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 00:40:07 -04:00
2026-06-06 00:40:07 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 01:05:00 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 10:24:22 -04:00
2026-06-06 11:08:07 -04:00
2026-06-06 11:08:07 -04:00
2026-06-06 11:08:07 -04:00
2026-06-06 11:08:07 -04:00
2026-06-06 11:08:07 -04:00
2026-06-06 11:08:07 -04:00
2026-06-06 11:08:07 -04:00
2026-06-06 11:08:07 -04:00