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

Merge multiple dir diffs to patch faster #381

Closed
Zeblote opened this issue May 19, 2024 · 6 comments
Closed

Merge multiple dir diffs to patch faster #381

Zeblote opened this issue May 19, 2024 · 6 comments

Comments

@Zeblote
Copy link

Zeblote commented May 19, 2024

Hi, is there any mechanism for merging dir diffs or applying multiple of them together?

For example, imagine we have these diffs

V1 -> V2
V2 -> V3
...
V9 -> V10

And now a user has V1, but the most recent version is V10.

We can of course apply all 9 diffs in order, re-writing all of the files every time.
But that's much slower than it would be to apply a single diff from V1 -> V10.

Is there a way to merge all those diffs, or apply them together somehow, and only re-write the files once?

@sisong
Copy link
Owner

sisong commented May 20, 2024

The current hdiffpacth does not support this feature (which was previously supported by the company's internal version), Because I think it's better like this:

V1 -> V10
V2 -> V10
...
V9 -> V10

Provide as many specialized patches as possible to give the best experience to all users.

@sisong sisong closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
@Zeblote
Copy link
Author

Zeblote commented May 26, 2024

I see, that is unfortunate, as creating multiple patches takes more time (we are using this in a CI/CD environment to bring the user up to date with the latest version from whatever they have). But if it doesn't exist yet it's probably not worth the effort to add it just for such an edge case.

Might look into making patches going back 2, 4, 8, etc versions so there's a "tree" you can follow to update in less steps.

@sisong
Copy link
Owner

sisong commented May 26, 2024

For very old versions, can use hsynz? ( It can fast created all diffFiles for between every version and current version; or do diff & patch by client self)

@Zeblote
Copy link
Author

Zeblote commented May 26, 2024

I have not heard of that before. Sounds interesting! Will check it out.

@sisong
Copy link
Owner

sisong commented May 26, 2024

Have you tested using "-s-?" to control hdiffz speed? (this is a minor change)

@Zeblote
Copy link
Author

Zeblote commented May 27, 2024

Still using -s-48 like you had suggested a few years ago. I'm not entirely sure what the parameter actually does behind the scenes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants