mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
db9e0b0ccb
Simplify and optimize the processing of the input stream. The existing implementation was using bufferUntil and creating a List for every line along with an EndFrameBuffer inserted for the bufferUntil predicate. So the larger the input buffer and the more lines it contained, the greater the overhead. The new implementation avoids bufferUntil for all lines and instead uses concatMapIterable to aggregate the lines from a buffer into a single list. So the larger the input buffer and the more lines it contains, the better the throughput. The only buffering used then is for partial chunks and those are accumulated in a list. See gh-25915