News for hackers. Stuff that matters.
Re:Java at 30: The Genius Behind the Code That Changed Tech by surajrmal on Saturday May 17, 2025 @11:16AM (#44014935)
Depending on the situation, channels can absolutely be higher overhead and not worthwhile. Google internally recommends not using them in many situations.

Unbuffered IO is a tradeoff. For certain use cases it does help, because throughput isn't everything. I'm sure Buffered is better in the average use case, but that doesn't mean you would never need unbuffered.

Re:Java at 30: The Genius Behind the Code That Changed Tech by fidotron on Saturday May 17, 2025 @12:36PM (#44015439)
> Depending on the situation, channels can absolutely be higher overhead and not worthwhile.

Like streaming arrays one byte at a time through the channel.

Such devs just aren't very good, and hear "Google internally recommends not using them in many situations" but jump to inferring that means all of their situations qualify.

> but that doesn't mean you would never need unbuffered.

Note that this was never claimed.

Re:Java at 30: The Genius Behind the Code That Changed Tech by surajrmal on Saturday May 17, 2025 @02:10PM (#44015979)
Channels make the most sense when you need to decouple code. The performance differences rarely are a bit deal. Most of the time it's unnecessary cognitive overhead. People treat both sides as dogma, but the truth is that you need to be think critically when choosing between the two.