In mgpy, memory usage often creeps up slowly: large reports, history files, caches or build artifacts grow longer unnoticed than simple runtime spikes.
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 .... - Watch mgpy runs that produce large JSON reports, long history files and repeatedly loaded dependencies.
- Short-lived CLI runs should not leave unnecessary global caches behind.
- Memory profiling matters most when extended checks run in CI or on smaller runners.
Recommended mgpy workflow
- Build reproducible scenarios with larger projects or large report files first.
- Then identify objects and files that keep growing across multiple mgpy runs without reason.
- After memory fixes, write the same reports again and confirm the output still matches semantically.
Quick start
py -3.12 -m manifestguard check --extended --report .manifestguard/large-run.json
py -3.12 -m manifestguard baseline --list
py -3.12 -m manifestguard export-metrics --output metrics.json