ColinLeeo opened a new issue, #1076: URL: https://github.com/apache/tsfile/issues/1076
## Problem `Int64RleDecoder::read_length_and_bitwidth` / `Int32RleDecoder::read_length_and_bitwidth` copy the whole encoded pattern into a temporary buffer (`tmp_buf_`) on every pattern, then wrap `byte_cache_` over that copy. Profiling a wide-table read showed this memcpy at ~7.5% of the query. ## Proposed changes When the caller's `ByteStream` is wrapped and has at least `length_` bytes left, wrap `byte_cache_` directly over the caller's buffer and advance its read position; fall back to the copy for paged or short streams. The caller's stream outlives the pattern decode, so no lifetime issue. Implemented in #1072. Related: #1072 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
