The decoder for incoming requests uses the default bytebuf
allocator to create the frame buffer; this default prefers
direct memory. It is thus unnecessary, when receiving
data to be written to disk, to reallocate a direct buffer
(alloc().ioBuffer(...)) and write the data from the frame
buffer to it.
Modification:
Use a retainedSlice to preserve the data portion of the
frame buffer and assign it to the data field.
…request
Motivation:
The decoder for incoming requests uses the default bytebuf allocator to create the frame buffer; this default prefers direct memory. It is thus unnecessary, when receiving data to be written to disk, to reallocate a direct buffer (alloc().ioBuffer(...)) and write the data from the frame buffer to it.
Modification:
Use a retainedSlice to preserve the data portion of the frame buffer and assign it to the data field.
Result:
This should somewhat optimize write.
No observable change to user.
Target: master Patch: https://rb.dcache.org/r/13633/ Acked-by: Lea Acked-by: Dmitry Request: 4.4 Requires-notes: yes Requires-book: no