swactor/crates/engine/tests/common
Zachery Aaron Shores-Chmielewski a2ef459228 perf(engine): park idle core drivers instead of self-wake spinning
The core driver re-armed itself via wake_by_ref() after every poll, an
unconditional spin at scheduler speed per worker for the engine's
lifetime. The provisioning-reconciler-demo supervisor + 3 node children
burned ~750% CPU idle; now ~50% (demo churn), wakeup latency for work
delivered to an idle worker bounded by the idle interval.

- ExecutionBackend::core_idle_poll() (default Duration::ZERO = previous
  immediate re-arm) lets a backend opt its drivers into idle parking.
- TokioConfig::core_idle_poll (default 500us) configures it for the
  Tokio backend; from_runtime adopts the default.
- CoreDriver: busy tick (or zero interval) re-arms immediately; idle
  tick arms one backend timer and parks. Every poll still runs exactly
  one try_tick, so stepping-backend semantics are unchanged. The
  backend is held Weak and touched only on idle transitions; if the
  engine is gone the driver parks until the substrate cancels it.
- Contract tests: a parked driver observes a late external
  (engine-invisible) send within the idle interval; the backend reports
  its configured interval.
2026-08-16 17:27:38 +04:00
..
mod.rs perf(engine): park idle core drivers instead of self-wake spinning 2026-08-16 17:27:38 +04:00