When Structs in Swift Aren’t Your Bros
summary
Explains what a link map is and how to use it to find code that most increases app size. Describes Swift compiler behaviors that can make ordinary value types generate tens of megabytes of binary code and shows how the team reduced app size in Alfa-Bank’s iOS app by refactoring code (including how many lines were rewritten and how many megabytes saved).
AI-written summary · about
chapters (18)
- 0:00Introduction
- 1:02Speaker intro
- 2:50Problem overview
- 3:55What is a link map
- 8:29Link map analyzer
- 11:01Unexpected findings
- 13:32Reproducing the issue
- 16:01Protocol conformance worsens it
- 19:17Large value types problems
- 21:51Apple's awareness
- 22:34Switching to reference types
- 24:39Benchmarking value vs reference
- 26:23Indirect enums solution
- 28:08Finding problematic structures
- 31:37Optimization results
- 33:45Quick fixes
- 35:29Open questions
- 36:55Q&A
