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

plumbing: packafile, improve delta reutilization #697

Merged
merged 1 commit into from
Dec 20, 2017
Merged

plumbing: packafile, improve delta reutilization #697

merged 1 commit into from
Dec 20, 2017

Conversation

ajnavarro
Copy link
Contributor

@ajnavarro ajnavarro commented Dec 18, 2017

  • Remove wrong 'if' on delta selector that causes poor delta reutilizations
  • packfile.Encoder now can write deltas and objects in a non specific order
  • ObjectToPack now saves the Offset on the packfile to be able to obtain base
    offset in a recursive manner and write them before the delta itself
  • Added encoder test to check cyclic delta chains
  • Check the output packfile hash in all encoder tests

Using #627 to check the performance:

Using go-git on master branch:

$ time git clone http://localhost:8822/aws-sdk-go
Cloning into 'aws-sdk-go'...
Receiving objects: 100% (43056/43056), 55.47 MiB | 2.38 MiB/s, done.
Resolving deltas: 100% (24371/24371), done.
Checking connectivity... done.

real	2m27.738s
user	0m5.376s
sys	0m0.616s

Using this PR:

$ time git clone http://localhost:8822/aws-sdk-go
Cloning into 'aws-sdk-go'...
Receiving objects: 100% (43056/43056), 43.92 MiB | 2.09 MiB/s, done.
Resolving deltas: 100% (26658/26658), done.
Checking connectivity... done.

real	1m9.373s
user	0m4.940s
sys	0m0.560s

Signed-off-by: Antonio Jesus Navarro Perez antnavper@gmail.com

@ajnavarro ajnavarro changed the title [WIP] Improve delta reutilization Improve delta reutilization Dec 20, 2017
- Remove wrong 'if' on delta selector that causes poor delta reutilizations
- packfile.Encoder now can write deltas and objects in a non specific order
- ObjectToPack now saves the Offset on the packfile to be able to obtain base
offset in a recursive manner and write them before the delta itself
- Added encoder test to check cyclic delta chains
- Check the output packfile hash in all encoder tests

Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
@mcuadros mcuadros changed the title Improve delta reutilization plumbing: packafile, improve delta reutilization Dec 20, 2017
@mcuadros mcuadros merged commit ca59809 into src-d:master Dec 20, 2017
@ajnavarro ajnavarro deleted the performance/improve-delta-reusing branch December 20, 2017 16:32
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.

2 participants