Skip to content

Cache Sentence Tokenization in Co-Citations #2

@hittjwX

Description

@hittjwX

Cache Sentence Tokenization in Co-Citations (High Value, Low Risk)

File/Line: MyGraph.ts:220-235

Description: In the co-citations algorithm, cachedRead and tokenizer.sentences() are called for each backlink file. Cache tokenized sentences per file path in a Map within the MyGraph class, computed lazily on first access.

Why: Sentence tokenization is CPU-intensive and repeated for files with multiple backlinks. Caching reduces redundant parsing, speeding up co-citations (the most complex algorithm) for notes with many references. Low risk; uses existing Obsidian caching patterns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions