-
Task
-
Resolution: Done
-
Major
-
None
-
None
Jackson usually configure different form of buffer pooling (see https://github.com/FasterXML/jackson-core/blob/e19615bb99f6127230793e2c7766bbb3beaee6fc/src/main/java/com/fasterxml/jackson/core/io/IOContext.java#L63) and perform a single write(byte[] b, int offset, int lengh) vs the provided output stream during serialization, using its internally pooled buffer.
In short, this enable an async write to:
- expect a single encoded byte[]
- size the receiver output stream exactly to it
- save the additional copy for the async completion to happen
This is just an idea as the subsequent AsyncOutputStream ::asyncWrite can "backfire" performing an additional copy, see 3408cf1
see