Pankraz76 commented on PR #13747:
URL: https://github.com/apache/maven/pull/13747#issuecomment-6491735624

   Thanks @gnodet, agreed: this belongs in JLine. Done:
   
   - jline/jline3#2353 (`master`)
   - jline/jline3#2355 (`jline-3.x` backport, the one Maven 3.10.x needs)
   
   On `master`, `NonCloseableOutputStream` already passes bulk writes through, 
so only option A (buffering) was missing. The `jline-3.x` backport applies A 
and B. The new `DumbTerminalProviderTest` fails without the fix (15,360 writes 
for a 15 KiB payload).
   
   Verified end to end: an unpatched Maven 3.10 with only the patched 
`jline-terminal` jar goes from 56,357 to 1,163 `write(2)` calls on piped 
stdout, with identical output. So a `jlineVersion` bump will be all Maven needs.
   
   On the interim workaround: wrapping `terminal.output()` in a 
`BufferedOutputStream` wouldn't help on 3.30.x. The buffer flushes through 
`write(byte[], int, int)` into JLine's `NonCloseableOutputStream`, which 
inherits `FilterOutputStream`'s byte-by-byte loop, so every byte still becomes 
its own `write(2)`. That's why this PR replaced the stream instead.
   
   I've converted this PR to draft. Once a JLine 3.30.x release with the 
backport is out, I'll replace the workaround with the `jlineVersion` bump.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to