pr: stream simple layouts for non-file inputs#11244
Open
mattsu2020 wants to merge 3 commits into
Open
Conversation
Contributor
|
the list of commits isn't ideal, could you please improve it? thanks |
|
GNU testsuite comparison: |
Merging this PR will not alter performance
Comparing Footnotes
|
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
65 tasks
sylvestre
reviewed
Jun 7, 2026
sylvestre
reviewed
Jun 7, 2026
sylvestre
reviewed
Jun 7, 2026
sylvestre
reviewed
Jun 7, 2026
sylvestre
reviewed
Jun 7, 2026
mattsu2020
force-pushed
the
pr_zero
branch
2 times, most recently
from
June 7, 2026 15:10
e65dcbb to
4668cda
Compare
Replace the whole-buffer page parser with a chunk-aware PageBuilder while preserving the existing buffered output path. This isolates page boundary and line-number handling before the streaming path is enabled.
Process simple layouts from pipes, stdin, and character devices incrementally instead of buffering unbounded input. Reuse PageBuilder for pagination, preserve buffered fallback behavior, and cover streaming devices, FIFO parity, invalid UTF-8, and zero-content-line cases.
Contributor
|
Conflicting |
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.
Summary
This PR adds a streaming path for simple
prlayouts so inputs such ascharacter devices and FIFOs can be processed incrementally instead of buffering
the entire input in memory.
The main goal is to avoid OOM-like behavior for inputs such as
/dev/zero,where
prcan produce output line by line without waiting for a full read.What changed
prlayoutsRelated