SlideShare ist ein Scribd-Unternehmen logo
1 von 121
Downloaden Sie, um offline zu lesen
The art of developing
more in less time -
how to not get caught
by long build times?
@EliSawic
About me
Eliasz Sawicki
Blog: www.eliaszsawicki.com
Twitter: @EliSawic
www.brightinventions.pl
@EliSawic
A short story
about Love
@EliSawic
A short story about Love
1. Friendship
@EliSawic
A short story about Love
1. Friendship
2. Love
@EliSawic
A short story about Love
1. Friendship
2. Love
3. Doubt
@EliSawic
A short story about Love
1. Friendship
2. Love
3. Doubt
4. Betrayal
@EliSawic
A short story about Love
1. Friendship
2. Love
3. Doubt
4. Betrayal
5. Starting over again
@EliSawic
A short story about Love
1. Friendship
2. Love
3. Doubt
4. Betrayal
5. Starting over again
6. Rebuild the trust
@EliSawic
How does it end?
@EliSawic
Friendship
@EliSawic
Objective-C
@EliSawic
The UIKit
@EliSawic
Why do we need
UIKit?
@EliSawic
Love
@EliSawic
$wift
@EliSawic
Practice
@EliSawic
Tests!
@EliSawic
Why do we need
tests?
@EliSawic
Why do we
have brakes
in a car?
@EliSawic
To stop?
@EliSawic
To go faster!
@EliSawic
Test
Driven
Development
@EliSawic
Think
@EliSawic
Doubt
@EliSawic
Long
build
times
@EliSawic
Slow
feedback
loops
@EliSawic
No tests
for you today
@EliSawic
Betrayal
@EliSawic
React Native
@EliSawic
Testing feels
natural
@EliSawic
Quick reloading
@EliSawic
Not a
silver bullet
@EliSawic
Starting over again
@EliSawic
What was the
problem?
@EliSawic
Long
build
times
@EliSawic
Slow
feedback
loop
@EliSawic
Rebuild
the trust
@EliSawic
Tackling
compilation
times
@EliSawic
Type
Inference
@EliSawic
Type Inference
let viewController = UIViewController()
viewController = UIView() // Nope
@EliSawic
Bottleneck
@EliSawic
Warnings
-Xfrontend
-warn-long-function-bodies=200
-Xfrontend
-warn-long-expression-type-checking=100
@EliSawic
Debug
information
format
@EliSawic
With or without you?
@EliSawic
DWARF
with
dSYM file?
@EliSawic
Take a look at
your build phases
@EliSawic
Build phases
@EliSawic
Build phases
@EliSawic
Build Active Architecture Only
@EliSawic
Active architecture
@EliSawic
Whole
module
optimization
@EliSawic
Drastically decreased
time in which the
project compiles
@EliSawic
A catch
@EliSawic
A trick
@EliSawic
Why isn't it
turned on
all the time?
@EliSawic
Managing
dependencies
@EliSawic
Cocoapods
@EliSawic
Carthage
@EliSawic
Build tools
@EliSawic
Bazel, Buck
@EliSawic
Xcode
@EliSawic
Xcode
@EliSawic
Xcode settings
defaults write com.apple.dt.Xcode
IDEBuildOperationMaxNumberOfConcurrentCompileTasks 8
@EliSawic
Optimizations
@EliSawic
Optimizations
• Compilation costs
@EliSawic
Optimizations
• Compilation costs
• Don't trust defaults
@EliSawic
Optimizations
• Compilation costs
• Don't trust defaults
• Understand tradeoffs
@EliSawic
Easy way to decrease
the compilation time
by half
@EliSawic
Write smaller apps!
@EliSawic
Modularizing
the code
@EliSawic
More things to think
about...
@EliSawic
Is it bad?
@EliSawic
When do we
want to split?
@EliSawic
We don't need it
at the beginning
@EliSawic
It will be harder later
@EliSawic
What should
we do?
@EliSawic
Do it later
@EliSawic
How do we split?
@EliSawic
Don't bite off more
than you can chew
@EliSawic
Step
by
step
@EliSawic
What is the code
that I write?
@EliSawic
We
write
apps!
@EliSawic
Do we really
write apps?
@EliSawic
Tests!
@EliSawic
Why do we compile
the UI code?
@EliSawic
Separating
the UI
@EliSawic
Is it bad that we
break up
with UIKit?
@EliSawic
Nope
@EliSawic
MVC
@EliSawic
MVC
@EliSawic
MVVM
@EliSawic
MVVM
@EliSawic
Why would you
remove UIKit?
@EliSawic
Can be used
anywhere
@EliSawic
Can be tested
anywhere
@EliSawic
How do we
achieve it?
@EliSawic
Passive Views
@EliSawic
What is a
passive view?
@EliSawic
Logic
@EliSawic
Why are they still
together?
@EliSawic
Multiple targets
@EliSawic
One for UIKit
@EliSawic
One for logic
@EliSawic
Two for Tests
@EliSawic
More things
to handle
@EliSawic
Better architecture
@EliSawic
Speeded up tests
@EliSawic
Faster builds
@EliSawic
Modularizing
@EliSawic
Modularizing
• Take small steps
@EliSawic
Modularizing
• Take small steps
• Use tests as your first client
@EliSawic
Modularizing
• Take small steps
• Use tests as your first client
• It's not always worth to modularize
@EliSawic
How does the love
story end?
@EliSawic
Stronger
relationship
@EliSawic
The art of developing
more in less time
@EliSawic
How to not get
caught by long build
times?
@EliSawic
Time is not the only
issue
@EliSawic
The art of developing
more in less time
@EliSawic
It's about the
experience
@EliSawic
Protect your
feedback loop
@EliSawic

Weitere ähnliche Inhalte

Mehr von Eliasz Sawicki

Eliasz sawickimeetupit
Eliasz sawickimeetupitEliasz sawickimeetupit
Eliasz sawickimeetupitEliasz Sawicki
 
Introduction to react native
Introduction to react nativeIntroduction to react native
Introduction to react nativeEliasz Sawicki
 
Introduction To Functional Reactive Programming Poznan
Introduction To Functional Reactive Programming PoznanIntroduction To Functional Reactive Programming Poznan
Introduction To Functional Reactive Programming PoznanEliasz Sawicki
 
Introduction to Functional Reactive Programming
Introduction to Functional Reactive ProgrammingIntroduction to Functional Reactive Programming
Introduction to Functional Reactive ProgrammingEliasz Sawicki
 
Time traveling with ReSwift
Time traveling with ReSwiftTime traveling with ReSwift
Time traveling with ReSwiftEliasz Sawicki
 
ReSwift CocoaHeads Tricity
ReSwift CocoaHeads TricityReSwift CocoaHeads Tricity
ReSwift CocoaHeads TricityEliasz Sawicki
 
ReactiveCocoa workshop
ReactiveCocoa workshopReactiveCocoa workshop
ReactiveCocoa workshopEliasz Sawicki
 

Mehr von Eliasz Sawicki (12)

Redux - 4Developers
Redux - 4DevelopersRedux - 4Developers
Redux - 4Developers
 
Eliasz sawickimeetupit
Eliasz sawickimeetupitEliasz sawickimeetupit
Eliasz sawickimeetupit
 
Tech fest
Tech festTech fest
Tech fest
 
Introduction to react native
Introduction to react nativeIntroduction to react native
Introduction to react native
 
iOSCon
iOSConiOSCon
iOSCon
 
Code europe
Code europeCode europe
Code europe
 
Introduction To Functional Reactive Programming Poznan
Introduction To Functional Reactive Programming PoznanIntroduction To Functional Reactive Programming Poznan
Introduction To Functional Reactive Programming Poznan
 
Introduction to Functional Reactive Programming
Introduction to Functional Reactive ProgrammingIntroduction to Functional Reactive Programming
Introduction to Functional Reactive Programming
 
Time traveling with ReSwift
Time traveling with ReSwiftTime traveling with ReSwift
Time traveling with ReSwift
 
Calabash
CalabashCalabash
Calabash
 
ReSwift CocoaHeads Tricity
ReSwift CocoaHeads TricityReSwift CocoaHeads Tricity
ReSwift CocoaHeads Tricity
 
ReactiveCocoa workshop
ReactiveCocoa workshopReactiveCocoa workshop
ReactiveCocoa workshop
 

Developing more in less time