apple / apple/swift-http-api-proposal

[HTTPAPIs] Explore using a `[Output]Span<RigidArray<UInt8>>` for the reader and writer

Open
#28 0 comments 0 reactions 0 assignees View on GitHub
async-streaming kind/enhancement status/needs-design
Dominant language
Swift
Stars
66
Forks
21
Avg merge
7h 39m
Merged PRs (30d)
2

Description

Right now the reader and writer types of the client and server are constraint to `UInt8>` which allows the underlying implementation to use whatever bag-of-bytes type they have available. However, this only allows us to do a single read->write over one `Span` of bytes. However, we will often have multiple discontiguous chunks of memory available at once and we should give the developer all of those discontiguous chunks at once. The goal is that this allows for better performance since we can batch more writes at once. We should explore constraining the reader and writer types over `RigidArray`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.