Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

packfile: improve performance of delta generation #582

Merged
merged 5 commits into from
Sep 7, 2017

Conversation

erizocosmico
Copy link
Contributor

@erizocosmico erizocosmico commented Sep 6, 2017

Caveats

I kept the old API for deltas untouched and added some private methods that reuse indexes, so the methods can be used outside and the index is automatically created.

I ported a modified version of JGit's DeltaIndex and DeltaIndexScanner that is faster (not much more, though) and, somehow, make the encode process faster. A process that consistently took ~2m30s before now takes ~1m with this. This might be caused by a bug in the index, of course, but everything seems to be ok according to the tests and some manual check I did with the aforementioned process.

@codecov
Copy link

codecov bot commented Sep 6, 2017

Codecov Report

Merging #582 into master will decrease coverage by 0.29%.
The diff coverage is 96.49%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #582     +/-   ##
=========================================
- Coverage   78.04%   77.75%   -0.3%     
=========================================
  Files         129      130      +1     
  Lines        9963    10097    +134     
=========================================
+ Hits         7776     7851     +75     
- Misses       1341     1414     +73     
+ Partials      846      832     -14
Impacted Files Coverage Δ
plumbing/format/packfile/diff_delta.go 90.47% <100%> (-1.26%) ⬇️
plumbing/format/packfile/delta_index.go 100% <100%> (ø)
plumbing/format/packfile/delta_selector.go 78.94% <79.31%> (-0.59%) ⬇️
plumbing/transport/ssh/common.go 20.54% <0%> (-45.21%) ⬇️
plumbing/transport/ssh/auth_method.go 31.57% <0%> (-22.81%) ⬇️
plumbing/format/packfile/patch_delta.go 76.61% <0%> (+4.83%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2dc59a6...6d486b4. Read the comment docs.

@erizocosmico erizocosmico changed the title [wip] packfile: improve performance of delta generation packfile: improve performance of delta generation Sep 7, 2017
@erizocosmico
Copy link
Contributor Author

This is ready for review now

Copy link
Contributor

@ajnavarro ajnavarro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 👏 👏 👏

@mcuadros mcuadros merged commit 43e5f5f into src-d:master Sep 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants