-
Notifications
You must be signed in to change notification settings - Fork 460
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
Allow opting-out of CustomDebugStringConvertible to reduce binary size #1245
Comments
This sounds sorta like another take on #1240. With respect to compilation flags - those seems like they never work in practice with build systems - i.e. - how does one make that work (at scale) with SwiftPM/CocoaPods/etc. TVL |
@thomasvl: The
|
Yes, |
This observation comes from researching #1204.
It appears that
CustomDebugStringConvertible
's contribution to the binary size adds up and is not insignificant.A quick check shows that removing it from
Message
,SimpleExtensionMap
,AnyExtensionField
would save us~800kB
.For context, our project has around 1000 message definitions.
This was a modified version 1.17.0,
compiled with
-Osize
,Xcode 13.2.1 13C100, Swift 5.5.2, Big Sur
Since conforming to
CustomDebugStringConvertible
does not seem essential, perhaps it could could be tied to a compilation flag?I'd like to hear some initial feedback @thomasvl before getting into details.
The text was updated successfully, but these errors were encountered: