Skip to content

Cache the history between runs #78

Open

Description

@typeweaver

Every analyze and inspect reads the git history again. Since the series covers at least 24 months (#61), a default run on a large repository (angular/angular) takes about 24 s, and an agent that runs inspect before each edit pays that every time.

Idea: cache what the history scan produces per commit (changes, numstat, raw entries, classification inputs) under the repository's .git directory (or an OS cache directory), keyed by commit id, and only read commits that are not cached yet. Invalidate on a codeheat version change or a schema change of the cache.

Done when: a second run on angular/angular with no new commits is several times faster than the first; results are byte-identical with and without the cache; the cache can be disabled; the README "Known limits" entry "Each run reads the history again" is removed.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions