Skip to content

Reduce foreground and background runtime overhead#35

Open
PrimeBuild-pc wants to merge 4 commits into
mainfrom
perf/minimize-runtime-overhead
Open

Reduce foreground and background runtime overhead#35
PrimeBuild-pc wants to merge 4 commits into
mainfrom
perf/minimize-runtime-overhead

Conversation

@PrimeBuild-pc

Copy link
Copy Markdown
Owner

Summary

  • cache persistent process-rule snapshots in RAM with serialized load/save access
  • pre-match process-start events by name before path/full process enrichment
  • stop persistent Information logging for irrelevant process starts
  • dispose System.Diagnostics.Process handles and materialize process enumerations
  • clear all PID-scoped runtime caches when any process exits

P0 only. This does not change power-plan refresh, ViewModel initialization, logging/WMI timers, version metadata, or persistent-priority verification/retry behavior from #32.

Measurements

Release measurements used the same WinX64-SingleFile profile as the official workflow and identical one-second sampling scenarios.

Scenario Avg CPU before Avg CPU after Delta Handles end Handles max
visible idle 27.6748% 30.0053% +8.4% 1705 → 1674 1767 → 1740
hidden idle 0.0878% 0.0176% -80.0% 698 → 691 705 → 703
hidden + 80 process churn 0.2107% 0.1404% -33.4% 691 → 687 707 → 703

Memory remained effectively flat in the targeted hidden scenarios (+0.4% working set hidden idle, +0.6% under churn). The visible run observed four extra existing schtasks.exe/power child commands (31 vs 27), so its CPU delta is noisy and outside P0's background process-start target.

Validation

  • Release build: 0 warnings, 0 errors
  • 569/569 tests passed
  • official-method single-file publish succeeded
  • changed-file formatter verification passed
  • NuGet vulnerability audit found no vulnerable packages

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 57.25191% with 56 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
Services/ProcessService.cs 36.84% 24 Missing ⚠️
Services/PersistentProcessRuleJsonStore.cs 61.29% 4 Missing and 8 partials ⚠️
Services/ProcessMonitorService.cs 0.00% 10 Missing ⚠️
Services/PersistentRuleAutoApplyService.cs 70.96% 7 Missing and 2 partials ⚠️
Services/ProcessMonitorManagerService.cs 95.23% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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