Skip to content

[C++] arrow::io::CompressedInputStream might allocate buffer to many times #39377

@mapleFU

Description

@mapleFU

Describe the enhancement requested

in ::arrow::io::CompressedInputStream::Impl, the decompressed_buffer_ is initialized as 1MB, and would:

  1. Call Resize to release the memory if possible ( https://github.com/apache/arrow/blob/main/cpp/src/arrow/io/compressed.cc#L303 )
  2. Droped the memory when buffer exhausted ( https://github.com/apache/arrow/blob/main/cpp/src/arrow/io/compressed.cc#L324 )

Can we avoid re-allocating the buffer frequently, trying to keep 1MB data here?

Component(s)

C++

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions