Skip to content

Enhancement: Implement AST/parsing cache to optimize performance on large repositories #1288

Description

@Neelr1912

Is your feature request related to a problem? Please describe.

When running CodeGraphContext frequently during active development on a large codebase, the tool recalculates the entire context graph from scratch. Parsing the Abstract Syntax Trees (ASTs) or traversing all files repeatedly creates an unnecessary bottleneck and slows down the developer feedback loop.

Describe the solution you'd like

Introduce a caching mechanism (e.g., storing a .codegraph-cache file in the repository root or system temp directory). The tool should check file modification timestamps or hashes before parsing; if a file hasn't changed, it should load its context from the cache rather than re-parsing it.

Describe alternatives you've considered

Running the tool only on specific sub-directories, but this loses the global context of the codebase.

Additional context

A command-line flag like --clear-cache or --no-cache should be included to allow users to force a fresh run when needed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions