Repository navigation
Send only the new part of a log to its pane - #61
Merged
Merged
Conversation
The reader appended every read to a buffer it never trimmed and sent a clone of the whole buffer on every poll, whether or not the file had changed. It now sends a LogChunk: Replace on the first read and after a truncation or a read error, Append with just the new text otherwise, and nothing when the read comes back empty. The widgets apply the chunk to their content, so the reader no longer keeps a copy of its own.
fedonman
force-pushed
the
fixed/send-only-new-log-bytes
branch
from
September 30, 2026 12:59
e63071e to
b0ee8aa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The log reader sent a clone of everything it had read on every poll, so an open pane on an idle 20 MB log pushed 20 MB a second through the channel. It now sends a
LogChunk:Replaceon the first read and after a truncation or a read error,Appendwith only the new text otherwise, and nothing when the file has not changed. The widgets append instead of replacing, and the reader no longer keeps its own copy of the log. Tests cover an unchanged file and a read after an error.Closes #19