Skip to content

ci(pm): optimize Windows CI speed by disabling Defender real-time scanning#2669

Merged
xusd320 merged 1 commit intoutooland:nextfrom
fengmk2:ci/disable-windows-defender
Mar 8, 2026
Merged

ci(pm): optimize Windows CI speed by disabling Defender real-time scanning#2669
xusd320 merged 1 commit intoutooland:nextfrom
fengmk2:ci/disable-windows-defender

Conversation

@fengmk2
Copy link
Copy Markdown
Contributor

@fengmk2 fengmk2 commented Mar 8, 2026

Summary

Optimizes Windows CI build time by disabling Windows Defender real-time scanning, reducing NTFS I/O overhead for cargo builds, test execution, and npm operations.

Changes

  • Disable Windows Defender real-time scanning on Windows runners
    • Added early step using Set-MpPreference -DisableRealtimeMonitoring $true
    • Only runs on Windows (if: runner.os == 'Windows')
    • Applied to pm-ci.yml and pm-e2e.yml
    • pack-ci.yml Windows targets are currently commented out, no changes needed

Expected Impact

  • ~30-50% faster on I/O-heavy steps (cargo build, cargo test, npm install)
  • Zero risk: only affects ephemeral CI runners, Defender is restored when the runner is recycled

References

Disable Windows Defender real-time scanning on Windows runners to reduce
NTFS I/O overhead for cargo builds, test execution, and npm operations.

Expected savings: ~30-50% on I/O-heavy steps (cargo build, cargo test).

Applied to:
- pm-ci.yml (cargo test job)
- pm-e2e.yml (build + e2e test job)

Note: pack-ci.yml Windows targets are currently commented out, so no
changes needed there.
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@fengmk2
Copy link
Copy Markdown
Contributor Author

fengmk2 commented Mar 8, 2026

The results before the CI comparison are required to be confirmed by a real run @elrrrrrrr

@xusd320 xusd320 changed the title ci: optimize Windows CI speed by disabling Defender real-time scanning test(ci): optimize Windows CI speed by disabling Defender real-time scanning Mar 8, 2026
@xusd320 xusd320 changed the title test(ci): optimize Windows CI speed by disabling Defender real-time scanning ci(pm): optimize Windows CI speed by disabling Defender real-time scanning Mar 8, 2026
@xusd320 xusd320 enabled auto-merge (squash) March 8, 2026 09:54
@xusd320 xusd320 merged commit 503c73b into utooland:next Mar 8, 2026
66 of 68 checks passed
@xusd320
Copy link
Copy Markdown
Contributor

xusd320 commented Mar 8, 2026

Compared to https://github.com/utooland/utoo/actions/runs/22760763317/job/66016506427, improved by about 20%, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants