Skip to content

Commit 36a8c3c

Browse files
committed
log: stop emitting [trim] memory snapshots to changes.log
The two callers (MonitorService periodic trim, settings-closed cleanup) are removed. Psapi.TrimSelf and the GC compaction calls still happen on the same cadence — only the changes.log line is gone. LogMemorySnapshot itself is intentionally kept; opt back in at a specific call site if you're tracking a regression.
1 parent ba85d5e commit 36a8c3c

3 files changed

Lines changed: 1 addition & 8 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,4 @@ Latest released version: **v0.1.29**. https://github.com/carterscode/GamerGuardi
141141

142142
Working set after the v0.1.26 memory fixes is stable in the 40–80 MB band over hours of runtime. LOH compaction + visual-tree release on window close brought it down from a peak of 135 MB → ~25 MB at idle.
143143

144-
The `[trim ]` snapshots in `changes.log` are the canonical way to verify memory health over time:
145-
```
146-
[2026-05-07 02:14:08] [trim ] MEM WS=42MB Priv=128MB Handles=812 Threads=18 (trim)
147-
```
148-
149-
If a future session sees memory creeping back up, those entries point straight at when the regression happened.
144+
`ChangeLogger.LogMemorySnapshot` still exists but is no longer auto-called from `MonitorService` or the settings-closed path — the periodic `[trim ]` lines were too noisy in `changes.log`. Re-enable temporarily by adding the call back at either site if you need to track a regression.

src/GamerGuardian/App.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ private void ShowSettings()
165165
GC.WaitForPendingFinalizers();
166166
GC.Collect();
167167
GamerGuardian.Native.Psapi.TrimSelf();
168-
GamerGuardian.Services.ChangeLogger.LogMemorySnapshot("settings-closed");
169168
}, System.Windows.Threading.DispatcherPriority.ApplicationIdle);
170169
};
171170
_settingsWindow.Show();

src/GamerGuardian/Services/MonitorService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ private async Task TickAsync()
126126
GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
127127
GC.Collect(2, GCCollectionMode.Optimized, blocking: false, compacting: true);
128128
Psapi.TrimSelf();
129-
ChangeLogger.LogMemorySnapshot("trim");
130129
}
131130
}
132131
finally

0 commit comments

Comments
 (0)