Skip to content

Adopt DispatchData in URLSessionHTTPClient#167

Open
guoye-zhang wants to merge 2 commits into
apple:mainfrom
guoye-zhang:dispatch-data
Open

Adopt DispatchData in URLSessionHTTPClient#167
guoye-zhang wants to merge 2 commits into
apple:mainfrom
guoye-zhang:dispatch-data

Conversation

@guoye-zhang
Copy link
Copy Markdown
Collaborator

Eliminate Data flattening in URLSession backend by keeping DispatchData

@guoye-zhang guoye-zhang added the 🔨 semver/patch No public API change. label May 21, 2026
Copy link
Copy Markdown
Member

@FranzBusch FranzBusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to do this now? I think the better approach would probably be having DispatchData conform to RangeReplacableContainer and return that right away.

@guoye-zhang
Copy link
Copy Markdown
Collaborator Author

I don't want to expose DispatchData out of the API. The reader could expose Span into DispatchData or bridge individual regions into Data, but DispatchData is an implementation detail. Regardless, this change removes one hidden copy (flattening) in the implementation, so I think it's still worth doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants