Skip to content

[5.3] Reduce Generic use in Codable #31772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2020

Conversation

tbkka
Copy link
Contributor

@tbkka tbkka commented May 13, 2020

5.3 cherry-pick of #31278


Explanation: Changes two types that are internal to Codable/Decodable support to not be generic in the CodingKey. This should reduce metadata size for apps that make heavy use of Codable/Decodable
Scope: Changes to private classes within Codable/Decodable implementation
Radar: rdar://62620208
Risk: Possible performance impacts to Codable/Decodable users
Testing: Full CI, local testing, CI benchmarking

In particular, types generic on the CodingKey produce a lot of runtime metadata.
Reducing the number of such types should help with some of the reported memory
bloat from Codable.

Based on a suggestion of @jckarter

Resolves rdar://62620208
@tbkka tbkka requested a review from a team as a code owner May 13, 2020 22:35
@tbkka
Copy link
Contributor Author

tbkka commented May 13, 2020

@swift-ci please test

@compnerd compnerd added the r5.3 label May 13, 2020
@tbkka tbkka merged commit 1a4f523 into swiftlang:release/5.3 May 14, 2020
@tbkka tbkka deleted the tbkka-pr31278-decodable-5.3 branch October 16, 2020 00:32
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants