-
Notifications
You must be signed in to change notification settings - Fork 534
Conversation
498dc32
to
52b25c7
Compare
Codecov Report
@@ Coverage Diff @@
## master #564 +/- ##
==========================================
- Coverage 78% 77.38% -0.62%
==========================================
Files 129 129
Lines 9842 9845 +3
==========================================
- Hits 7677 7619 -58
- Misses 1327 1400 +73
+ Partials 838 826 -12
Continue to review full report at Codecov.
|
@@ -297,9 +297,10 @@ func (iter *treeEntryIter) Next() (TreeEntry, error) { | |||
|
|||
// TreeWalker provides a means of walking through all of the entries in a Tree. | |||
type TreeWalker struct { | |||
stack []treeEntryIter | |||
stack []*treeEntryIter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems safer to me; I was worried things that accessed the stack might end up calling Next
on a copy, rather than the real object. But the way the stack is used now, I don't think it's a real bug. If you want me to revert it, let me know.
Compared to the v4 branch we were using before, master branch seems to fix a few bugs and bring the time for pushing the KBFS repo from hours to about 25 minutes. With the following optimizations, I got that time down to less than 3 minutes. * src-d/go-git#564 * src-d/go-git#565 I suspect there are still lots more optimizations that can be done. I don't think there are many users of Push in this project.
Compared to the v4 branch we were using before, master branch seems to fix a few bugs and bring the time for pushing the KBFS repo from hours to about 25 minutes. With the following optimizations, I got that time down to less than 3 minutes. * src-d/go-git#564 * src-d/go-git#565 I suspect there are still lots more optimizations that can be done. I don't think there are many users of Push in this project.
Compared to the v4 branch we were using before, master branch seems to fix a few bugs and bring the time for pushing the KBFS repo from hours to about 25 minutes. With the following optimizations, I got that time down to less than 3 minutes. * src-d/go-git#564 * src-d/go-git#565 I suspect there are still lots more optimizations that can be done. I don't think there are many users of Push in this project.
Compared to the v4 branch we were using before, master branch seems to fix a few bugs and bring the time for pushing the KBFS repo from hours to about 25 minutes. With the following optimizations, I got that time down to less than 3 minutes. * src-d/go-git#564 * src-d/go-git#565 I suspect there are still lots more optimizations that can be done. I don't think there are many users of Push in this project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! Looks good to me, just one small request: can we add a test for Next
that ensures that hashes in seen
are actually skipped?
This helps avoids iterating down the same trees for every commit. For a big-ish repo with 35K objects (17K commits), this reduced the time for calling `revlist.Objects` during a push (with 0 hashes to ignore) from more than ten minutes to less than a minute.
52b25c7
to
d68f45f
Compare
Thanks for looking @erizocosmico. Now there's a simple test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks for the contribution!
Compared to the v4 branch we were using before, master branch seems to fix a few bugs and bring the time for pushing the KBFS repo from hours to about 25 minutes. With the following optimizations, I got that time down to less than 3 minutes. * src-d/go-git#564 * src-d/go-git#565 I suspect there are still lots more optimizations that can be done. I don't think there are many users of Push in this project.
Compared to the v4 branch we were using before, master branch seems to fix a few bugs and bring the time for pushing the KBFS repo from hours to about 25 minutes. With the following optimizations, I got that time down to less than 3 minutes. * src-d/go-git#564 * src-d/go-git#565 I suspect there are still lots more optimizations that can be done. I don't think there are many users of Push in this project.
This helps avoid iterating down the same trees for every commit. For a big-ish repo with 35K objects (17K commits), this reduced the time for calling
revlist.Objects
during a push (with 0 hashes to ignore) from more than ten minutes to less than a minute.