Skip to content

serve: per-query cost — rankArticlesForQuery re-reads every article from disk per MCP call #42

Description

@vedantggwp

Adversarial review residual: every grimoire_query/search re-reads all article markdown and recomputes IDF + sliding-window proximity with per-call RegExp construction. Fine at 18 articles; multi-MB IO + O(articles×terms×windows) at a few hundred. Fix direction: cache article text + precomputed term stats at startup (server already requires restart to pick up wiki changes, so caching is semantics-preserving).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions