WebGitNet icon indicating copy to clipboard operation
WebGitNet copied to clipboard

Displaying the Repository Impact is very slow on large repositories.

Open otac0n opened this issue 13 years ago • 4 comments

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.

otac0n avatar Aug 20 '11 01:08 otac0n

Perhaps the pain from this could be eased by storing the impact info every time there's a push?

drwelden avatar Aug 20 '11 02:08 drwelden

Didn't mean to hit the close button.

drwelden avatar Aug 20 '11 02:08 drwelden

Yeah, I was thinking about caching it based on the hash of the commit.

otac0n avatar Aug 20 '11 02:08 otac0n

We would actually have to hash 3 items together, to get an effective cache:

  1. The commit hash.
  2. The hash of the ignore file.
  3. 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.

otac0n avatar Sep 14 '11 04:09 otac0n