ShiKaiWi opened a new issue, #5250: URL: https://github.com/apache/arrow-rs/issues/5250
**Which part is this question about** <!-- Is it code base, library api, documentation or some other part? --> When decoding a column which is encoded with a dictionary, massive memory allocations are observed. After digging into the codebase, it is found there is no pre-allocation for the memory when `extend_from_dictionary`: https://github.com/apache/arrow-rs/blob/3cd6da0a6b97056f3717d3491c84ec6d734aa262/parquet/src/arrow/buffer/offset_buffer.rs#L89-L110 **Describe your question** <!-- A clear and concise description of what the question is. --> Shall we do pre-allocation before `try_push` the values one by one? **Additional context** <!-- Add any other context about the problem here. --> Here is the flamegraph collected from my service:  -- 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]
