Does naming conventions affect the memory of an iOS app or a .ipa file. i.e.: I have 10000 variables on my app, if I name all those variables with a single letter, will it reduce my size of the app rather than using big meaningful names for each variable?
The names of local variables are not included in output at all. The names of instance variables and functions can be, but it's generally not going to be at all significant compared to the size of your app's resources, unless you're doing things like automatically generating massive amounts of complicated generic code (non-generic code will have much shorter names due to how generics work internally).
You can see discussion of optimizations Swift will be doing automatically to reduce the size of symbol names in the email thread starting here: https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000479.html
I believe the technique they ended up with is significantly different than the original proposal, but the discussion is still relevant.
Overall, I would suggest not worrying about this. Unless your app is very unusual, there will virtually always be more important optimizations you can do instead of manually shortening symbol names.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With