From PR #196 review (Issue #4).
The fast-path detection re-embeds every active episode summary on each remember() call. With 20 active episodes, that's 20 embedding calls per memory stored.
Recommended fix: Cache summary embeddings keyed by (episode_id, summary_hash):
self._summary_embedding_cache = {} # {episode_id: (summary_hash, embedding)}
Only re-embed when the summary content changes (hash mismatch). This reduces embedding calls from O(active_episodes) to O(changed_episodes) per remember().
Part of Episode Memories (#190).
From PR #196 review (Issue #4).
The fast-path detection re-embeds every active episode summary on each
remember()call. With 20 active episodes, that's 20 embedding calls per memory stored.Recommended fix: Cache summary embeddings keyed by
(episode_id, summary_hash):Only re-embed when the summary content changes (hash mismatch). This reduces embedding calls from O(active_episodes) to O(changed_episodes) per remember().
Part of Episode Memories (#190).