Pre-compute the total size and allocate a single uninitialized sstring before copying the buffers, following the pattern from Seastar's read_entire_stream_contiguous(). This avoids iterative reallocation which is O(n^2) for large responses.
Pre-compute the total size and allocate a single uninitialized sstring before copying the buffers, following the pattern from Seastar's read_entire_stream_contiguous(). This avoids iterative reallocation which is O(n^2) for large responses.