Skip to content

Adopt DispatchData in URLSessionHTTPClient#167

Merged
guoye-zhang merged 3 commits into
apple:mainfrom
guoye-zhang:dispatch-data
May 28, 2026
Merged

Adopt DispatchData in URLSessionHTTPClient#167
guoye-zhang merged 3 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.

@guoye-zhang guoye-zhang enabled auto-merge (squash) May 28, 2026 22:03
@guoye-zhang guoye-zhang merged commit c1e322f into apple:main May 28, 2026
16 checks passed
@guoye-zhang guoye-zhang deleted the dispatch-data branch May 28, 2026 22:36
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