Summary
Move initialization strategy toward module-load initialization so command hot paths avoid repeated init guard invocation.
Why
Current cmdlets call Initialize-Sodium in begin, which still adds function-call and guard-check overhead in tight loops.
Proposed change
- Initialize Sodium once during module import where safe.
- Keep idempotent fallback guard for robustness.
- Ensure initialization errors surface clearly at import time.
Acceptance criteria
- Module import initializes sodium successfully on supported platforms.
- Cmdlets no longer pay repeated init-check overhead in normal execution.
- Existing tests pass.
- Cold/warm benchmark data is captured to confirm behavior.
Summary
Move initialization strategy toward module-load initialization so command hot paths avoid repeated init guard invocation.
Why
Current cmdlets call
Initialize-Sodiuminbegin, which still adds function-call and guard-check overhead in tight loops.Proposed change
Acceptance criteria