For mgpy, performance only matters after correctness and signal quality are stable. Fast wrong reports are worse than slower correct ones.
Key points
- CLI: On Windows the examples use the recommended
py -3.12 -m <module> ...form (for examplepy -3.12 -m manifestguard ...). On Linux/macOS this usually maps topython3.12 -m .... - Measure where runtime is spent first: imports, dependency scans, report serialization or deeper analysis.
- Optimizations should target real bottlenecks instead of guesses.
- For CLI tools, stable response time matters more than flashy micro-benchmarks.
Recommended mgpy workflow
- Measure the baseline run and the extended run separately so expensive checks stay visible.
- Split heavy work into clearly named phases and enable it only when needed.
- Export the same mgpy report before and after performance work to ensure no capability was lost.
Quick start
py -3.12 -m manifestguard check --report .manifestguard/before.json
py -3.12 -m manifestguard check --extended --report .manifestguard/after.json
py -3.12 -m manifestguard export-metrics --output metrics.json