Skip to content

Commit and stage execution time not constant #683

@joelverhagen

Description

@joelverhagen

I am currently using LibGit2Sharp (v0.15.0) to keep track of differences in many HTML files (~10,000). Each change to a file or new file results in a single commit. I have noticed that writes and commits are getting slower and slower. Here is a visualization of my tests:
graph

I tried to adjust the repository.Stage(...) and repository.Commit(...) time so that the size of the HTML file size was not taken into account. This was done by simply dividing the write and commit time by the file size.

I was not sure whether this slow down was expected, but after a bit of reading around, it seems to me that git commit should be constant time with respect to the number of commits or files already in the repository. I am not sure if the same assumption can be made about staging.

Is this a known issue with LibGit2Sharp? Or libgit2?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions