-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #725 Because `git.Log` from go-git traverses the history and computes the flattened list of commits before you can call `Next`, instead of traversing it lazily, gitbase took the same getting 1 commit than all of them. Instead, since we don't care about the commit order or any of the constraints go-git's log has, we can just walk all the commits lazily as they're requested. This query: SELECT commit_author_email FROM commits LIMIT 1 Took ~1m to execute. Now it takes ~5s with cold cache. Basically, walk all references that are hash references and from the HEAD commit of each reference walk the history until there are no more commits to walk skipping commits that have already been seen. Then, next reference and so on. Signed-off-by: Miguel Molina <[email protected]>
- Loading branch information
1 parent
0b4af78
commit 0c6afe8
Showing
7 changed files
with
206 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.