Optimize buffer allocation strategies #300

Closed
opened 2026-04-19 07:20:15 +00:00 by fuzzy · 1 comment
Owner
## Sub-tasks - [ ] [Implement sync.Pool for byte buffers](https://git.lan.thwap.org/thwap/gobz2/issues/296) - [ ] [Add adaptive buffer sizing (4KB to 1MB)](https://git.lan.thwap.org/thwap/gobz2/issues/297) - [ ] [Reduce CGo calls per operation](https://git.lan.thwap.org/thwap/gobz2/issues/298) - [ ] [Batch small inputs into larger chunks](https://git.lan.thwap.org/thwap/gobz2/issues/299)
fuzzy self-assigned this 2026-04-19 07:20:15 +00:00
fuzzy closed this issue 2026-04-19 15:43:52 +00:00
Author
Owner

Implemented in commit 0712bd8:

  • sync.Pool for byte buffers – reuse buffers across compression jobs
  • Adaptive buffer sizing (4KB–1MB) – size classes based on input
  • Reduced CGo calls per operation – batching small reads into larger chunks
  • Batch small inputs into larger chunks – configurable minChunkSize and maxBatchSize

All sub‑tasks completed; closing.

Implemented in commit 0712bd8: - **sync.Pool for byte buffers** – reuse buffers across compression jobs - **Adaptive buffer sizing (4KB–1MB)** – size classes based on input - **Reduced CGo calls per operation** – batching small reads into larger chunks - **Batch small inputs into larger chunks** – configurable `minChunkSize` and `maxBatchSize` All sub‑tasks completed; closing.
Sign in to join this conversation.
No description provided.