Files
mempalace/tests
Igor Lins e Silva a67b00d7c7 perf: cache ChromaDB PersistentClient instead of re-instantiating per call
The MCP server previously created a new PersistentClient on every tool
call via _get_collection(). This incurs HNSW index loading overhead
on each request.

Cache the client and collection at module level. The cache resets
naturally on process restart (MCP runs as a subprocess).

Also adds a _reset_mcp_cache fixture to conftest.py for test isolation.

Includes test infrastructure from PR #131.
92 tests pass.
2026-04-08 04:39:19 -03:00
..