ipfs / ipfs/go-dsqueue

Need batch read API that takes caller-supplied buffer to fill

Open
#35 1 comment 0 reactions 0 assignees View on GitHub
need/triage
Dominant language
Go
Stars
3
Forks
3
PR merge metrics
No merged PRs in 30d

Description

The current batch read API, `GetN`, creates and returns a new populated buffer on every call. This does not allow the buffer to be reused across multiple calls to `GetN`, and may result in GC that could be avoided by buffer reuse.

To address this, there should be a new API that takes a buffer, provided by the caller, and drains the queue into that buffer. A call to this API returns when the provided buffer is full or when there are no more items in the queue to drain.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.