You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reduce sidecar overhead from PresentMon row parsing, debug diagnostics, packet writes, and forced garbage collection.
Send live sensor readings to Settings while visible and replay the latest snapshot on open. Keep the overlay updating and use indexed sensor lookups.
Limit display enumeration to startup and event-triggered polling bursts.
Verification
198 Vitest, 42 HardwareMonitor, and 46 Rust tests passed. ESLint and the frontend production build passed.
The standalone TypeScript check reports the same five errors on main and this branch.
A five-minute synthetic replay matched readings and reduced allocations by 42%. An unelevated 90-second desktop sample showed median working set rising from 94.91 to 96.30 MiB.
An elevated Windows run displayed live sensor readings and verified two overlay hotkey cycles. Native tray reopen, physical display changes, sleep/resume, and a same-scene borderless game comparison remain open.
The changes update hardware polling and PresentMon diagnostics, route retained sensor snapshots between Tauri webviews, revise sensor lookup behavior, and limit overlay display polling to event-triggered bursts.
Changes: Hardware data polling
Layer / File(s)
Summary
Hardware status polling and serialization HardwareMonitor/HardwareMonitor/Monitor/MonitorPoller.cs, HardwareMonitor/HardwareMonitor/SharedMemory/SharedMemory.cs, HardwareMonitor/HardwareMonitor/HardwareMonitor.csproj
Status serialization reuses shared options, stream writes truncate before writing, sensor NaN values become zero, and periodic forced garbage collection is removed. Hardware read progress uses ReadStage; the project sets System.GC.ConserveMemory to 5.
PresentMon row parsing and diagnostics HardwareMonitor/HardwareMonitor/PresentMon/PresentMonPoller.cs, HardwareMonitor/HardwareMonitor.Tests/PercentileLowWiringTests.cs
PresentMon checks row length before splitting matching rows. Diagnostic snapshots, counters, and foreground-change logs are collected only when Debug logging is enabled. The wiring test covers short rows and app-picker behavior.
Tauri sensor delivery and overlay controls
Layer / File(s)
Summary
Snapshot retention and event routing tauri-app/src-tauri/src/pipe_client.rs, tauri-app/src-tauri/src/lib.rs
The app retains sensor snapshots and publishes sensor events to the overlay and, when visible, the settings webview. Disconnects clear the retained snapshot.
Settings display, focus, and resize paths request or replay settings snapshots. The settings and overlay webviews subscribe to separate sensor events.
Native overlay toggle and sensor-data behavior tauri-app/src-tauri/src/commands.rs, tauri-app/src-tauri/src/lib.rs, tauri-app/src/lib/tauri.ts, tauri-app/src/stores/settings-store.ts
The native toggle command inverts overlay visibility when it can read the current state. The store uses the command outside browsers and allows callers to suppress first-data overlay display.
Sensor lookup
Layer / File(s)
Summary
Sensor identifier and frametime lookup tauri-app/src/lib/utils.ts, tauri-app/src/lib/utils.test.ts
findSensorById indexes readonly sensor arrays and keeps the first match. findFrametimeSensor prefers the exact PresentMon identifier and otherwise uses a case-insensitive name or identifier match. Tests cover both helpers.
Sensor selection and display lookups tauri-app/src/hooks/useSensorData.ts, tauri-app/src/stores/settings-store.ts, tauri-app/src/lib/gpu.ts, tauri-app/src/components/overlay/FpsSection.tsx
Frametime selection, GPU sensor resolution, and FPS and percentile-low lookups use the shared helpers. Existing fallback behavior remains in place where described.
Overlay display polling
Layer / File(s)
Summary
Polling bursts and display-signal tests tauri-app/src/lib/overlay-displays.ts, tauri-app/src/lib/overlay-displays.test.ts
Display polling runs immediately and at the configured interval for up to 60 seconds. Initialization, resize, visibility, and DPI changes start or restart polling. Tests cover these signals and cleanup.
Merge Risk: Low · up to a5718
After a display resolution change at the same DPI, the overlay may stay positioned against the old monitor geometry until a resize, visibility change, or DPI change triggers a refresh. The rest of the change looks safe to merge. Consider adding a display-change trigger, or validating on a physical resolution change, before or soon after merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "Reduce monitoring overhead in Cleanmeter" matches the main goal in the objectives and the changeset. The changes cut PresentMon row parsing cost, debug diagnostics, packet writes, forced GC…
Description check
The description lists the main changes: sidecar overhead reduction from PresentMon parsing, debug diagnostics, packet writes and forced GC; live sensor readings sent to Settings with snapshot replay; …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "Reduce monitoring overhead in Cleanmeter" matches the main goal in the objectives and the changeset. The changes cut PresentMon row parsing cost, debug diagnostics, packet writes, forced GC, and display enumeration polling, all aimed at lower monitoring overhead. It is concise and specific enough for a teammate scanning history.
Full details: Description check
Explanation
The description lists the main changes: sidecar overhead reduction from PresentMon parsing, debug diagnostics, packet writes and forced GC; live sensor readings sent to Settings with snapshot replay; and limited display enumeration. It also gives verification results and open test items, so it relates directly to the changeset.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. 7 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Heavy lift
Monitor geometry can stay stale after a same-DPI resolution change.
Polling stops 60 seconds after each signal. After that, refresh runs only on resize, visibilitychange, or a DPI query change. A display resolution change at the same DPI can produce none of these events. The DPI query value does not change, visibilitychange does not fire, and resize fires only when the viewport size changes. The module subscribes to no display-change event.
The monitors state can then keep the previous x, y, width, and height. Later placement and clamping in OverlayApp.tsx can use these stale bounds and place the HUD against the wrong monitor area.
Monitor geometry must refresh after a display resolution change, including after the burst ends. Select a mechanism that the supported Windows and Tauri path delivers, and keep the burst behavior for startup retries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
Notion task