Skip to content

[Go][Parquet] Use custom allocator in ReaderProperties.GetStream #540

@daniel-adam-tfs

Description

@daniel-adam-tfs

Describe the enhancement requested

We're testing reading parquet files from S3 and I'm looking at the memory profile. We're using a 2GB file for testing and in the profile I see that the make call in

data := make([]byte, nbytes)
allocates about 2GB of data, which is about a third of the total allocations that our test that reads the whole file does.

I see that the ReaderProperties has an allocator field, but the allocation there is made using the standard Go call. Is there a reason why the custom allocator is not used there? I wanted to test using a custom allocator, so maybe we can switch the make call to r.alloc.Allocate ?

Component(s)

Parquet

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions