Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Loading large diffs is slow #1

Open
vfaronov opened this issue May 30, 2021 · 0 comments
Open

Loading large diffs is slow #1

vfaronov opened this issue May 30, 2021 · 0 comments

Comments

@vfaronov
Copy link
Owner

vfaronov commented May 30, 2021

Gunison reads diff output in chunks of up to 64 KiB (the current buffer size in watchUnison). After each chunk, Gunison runs a regexp (looking for the end of diff) on the entire diff output received so far. For large diffs that take many chunks to read, this gets quadratically slow.

One way to fix this would be to postpone core.ProcOutput until Gunison gets a short read or a timeout, indicating that Unison/diff has stopped writing.

But I’m not sure this is worth fixing, because:

  • diffs many times larger than 64 KiB must be rare;
  • regardless, users are better off configuring Unison to use a GUI diff tool (such as meld) that doesn’t write to stdout at all.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant