vfaronov / gunison

New GUI for the Unison synchronizer
MIT License
11 stars 0 forks source link

Loading large diffs is slow #1

Open vfaronov opened 3 years ago

vfaronov commented 3 years ago

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: