fix: override bulk write in NonCloseableOutputStream to avoid byte-at-a-time writes by gnodet · Pull Request #1962 · jline/jline3 (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@gnodet

@gnodet @claude

…-a-time writes (fixes #1943)

FilterOutputStream.write(byte[], int, int) calls write(int) in a loop, turning every buffered flush into hundreds of individual write syscalls. This causes visible flickering when writing rapid terminal output.

Override write(byte[], int, int) to delegate directly to the underlying stream's bulk write method.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

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

[ Show hidden characters]({{ revealButtonHref }})

Labels