WebGitNet
WebGitNet copied to clipboard
Displaying the Repository Impact is very slow on large repositories.
It takes about 26 seconds to show the impact of the Git project.
Another very simple repo with a single author, 4910 commits, 11130 additions, and 10647 deletions takes 19.45 seconds.
Perhaps the pain from this could be eased by storing the impact info every time there's a push?
Didn't mean to hit the close button.
Yeah, I was thinking about caching it based on the hash of the commit.
We would actually have to hash 3 items together, to get an effective cache:
- The commit hash.
- The hash of the ignore file.
- The hash of the rename files.
A change in any one of those files should invalidate the cache.
Ideally, once this was calculated for a given commit, it could be reused to incrementally calculate subsequent numbers.
Also, we could use the git filesystem (via git hash-object -w --stdin --no-filters
) to store and automatically garbage collect the cache.