Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore cache functionality #58

Open
vifactor opened this issue May 9, 2019 · 3 comments
Open

Restore cache functionality #58

vifactor opened this issue May 9, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request refactoring Non-user facing changes
Milestone

Comments

@vifactor
Copy link
Owner

vifactor commented May 9, 2019

Store fetched data in a easily readable format and next time when repo is about to be analyzed fetch only updated git objects.

@vifactor vifactor added the enhancement New feature or request label May 9, 2019
@vifactor vifactor added this to the v2 milestone May 9, 2019
@jonespm
Copy link
Contributor

jonespm commented Nov 10, 2019

Our repository is large and takes almost 5 minutes to fetch the author info. Caching even that would be a nice improvement!

@vifactor
Copy link
Owner Author

yeah, I filed this issue when I tried to work on a repo where analysis phase lasted more than 20 mins. I have it in plans, but the feature is not something quick. Do not have a deadline, but definitely will prioritize.

@vifactor vifactor modified the milestones: v2, v1.3 Nov 17, 2019
@vifactor vifactor self-assigned this Nov 17, 2019
@vifactor vifactor removed this from the v1.3 milestone Feb 12, 2020
@vifactor vifactor added this to the v2.1 milestone Mar 14, 2020
@vifactor vifactor added the refactoring Non-user facing changes label Apr 26, 2020
@vifactor vifactor modified the milestones: v2.1, 2.2 Apr 26, 2020
@vifactor vifactor modified the milestones: v2.2, v2.4 May 5, 2020
@vifactor vifactor modified the milestones: v2.4, v2.3 Jun 20, 2020
@vifactor
Copy link
Owner Author

History cache might be organized as follows:

merge_base = pygit2.Repository.merge_base("cache head", "current head")
  • if "cache head" exists in repo, one needs to use all commits "before" "merge_base" from cache and fetch data from
    "merge_base" to a current "head commit"

  • if "cache head" is not in repo anymore:
    a) either fetch whole history from scratch
    b) or find a commit in cache that still exists in repo and find "merge_base" with "current_head"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring Non-user facing changes
Projects
None yet
Development

No branches or pull requests

2 participants