segmentio / parquet-go

Go library to read/write Parquet files
https://pkg.go.dev/github.com/segmentio/parquet-go
Apache License 2.0
341 stars 58 forks source link

Collapse Buffer Pools to 1 #371

Closed joe-elliott closed 2 years ago

joe-elliott commented 2 years ago

Previously we reduced overall memory consumption of parquet-go by leveling our buffer pools. This PR collapses all buffer pools into 1 to reduce memory consumption even further.

I believe that they were broken out into individual pools to help consolidate buffers of similar sizes in different pools. However, with the leveling change sharing pools should reduce overall consumption. In practice we are seeing roughly 5% reduction in working set on the most heavily impacted processes.