Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rdiff inefficient for zero sized signatures. #13

Closed
vps2fast opened this issue Oct 13, 2014 · 3 comments
Closed

rdiff inefficient for zero sized signatures. #13

vps2fast opened this issue Oct 13, 2014 · 3 comments

Comments

@vps2fast
Copy link

@vps2fast vps2fast commented Oct 13, 2014

Hello!

I tried to use rdiff with zero sized signatures (with correct header but without any literals/copy items) and rdiff delta for this signatures produce bunch of cpu consumption and need so much time.

@vps2fast
Copy link
Author

@vps2fast vps2fast commented Oct 13, 2014

Here you can see example of "blank" signature file:

xxd -p /vz/tmp/extracted_backup_c0b3765b-5f6c-4633-9ac4-b10407896f6f.signature
727301360010000000000008

cat /vz/tmp/extracted_backup_c0b3765b-5f6c-4633-9ac4-b10407896f6f.signature
rs

xxd /vz/tmp/extracted_backup_c0b3765b-5f6c-4633-9ac4-b10407896f6f.signature
0000000: 7273 0136 0010 0000 0000 0008            rs.6........

@sourcefrog sourcefrog added the bug label Jul 2, 2015
@dbaarda
Copy link
Member

@dbaarda dbaarda commented Oct 10, 2017

I think this might be much better than it was now. There have been a large number of improvements since this bug was filed that should mean it's heaps faster.

There is one tiny thing that could be done to make this even faster; use a "slack delta" if there are no blocks. This will mean it bypasses rollsum calculation and just emits literal commands for each input buffer.

I can do this pretty easily... I'll put together a merge request.

@dbaarda dbaarda added performance and removed bug labels Oct 11, 2017
@dbaarda dbaarda changed the title rdiff can't handle zero sized signatures correctly rdiff inefficient for zero sized signatures. Oct 11, 2017
@dbaarda
Copy link
Member

@dbaarda dbaarda commented Oct 11, 2017

This is not a correctness bug, but a performance inefficiency. It works, it just needlessly generates rollsums to match against an empty hash table.

I'm going to fix this by making it do a "slack delta" for zero sized signatures. Pull request on the way.

dbaarda added a commit that referenced this issue Oct 11, 2017
Fix #13 use slack deltas for zero sized signatures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants