perf(memory): implement cache eviction in ChatRecordingService and fix leak during resets

This commit is contained in:
Gal Zahavi
2026-04-03 02:36:05 +00:00
parent 21ecd3ca9f
commit 57eea87d41
4 changed files with 115 additions and 7 deletions
+1
View File
@@ -1 +1,2 @@
2026-04-03: Completed Phase 1. Implemented scripts/simulate-long-session.ts to reproduce memory growth. Identified ChatRecordingService and GeminiChat history as primary growth sources. Captured baseline metrics showing ~180MB growth per 200MB of tool output data.
2026-04-03: Implemented memory-based cache eviction in ChatRecordingService (50MB threshold). Optimized initialization to prevent carrying over large session records in memory across chat resets. Verified with new unit tests.