Improving JSONDecoder/Encoder Performance for large apps

If we were to go with this kind of approach, yeah, I’d absolutely suggest a shared String-backed CodingKey like this.

It’s a possible approach if the entire implementation is autogenerated, potentially even without a flag, but…

… ultimately I hesitate to make any large changes to the compiler synthesis side of Codable. Ultimately exciting new things in this space are coming down the pike which specifically target resolving the issues identified and tackled here (and more!) which will diminish the value of big changes in present-day Codable.

1 Like