Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Building...Please, wait
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Vadym
April 03, 2020
Programming
64
0
Share
Building...Please, wait
Vadym
April 03, 2020
More Decks by Vadym
See All by Vadym
Date and time
degterev
0
45
Как перестать говорить "Ой, я забыл"
degterev
0
77
Other Decks in Programming
See All in Programming
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
150
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
1.8k
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
590
サーバーレスで作る、動画データ管理基盤
oyasumipants
0
260
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
380
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
200
Hive Metastoreを通して学ぶIceberg REST Catalog ― 仕様から実装まで
okumin
0
280
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1k
Agent Skills を社内で育てる仕組み作り
jackchuka
1
2.4k
AI Agent と正しく分析するための環境作り
yoshyum
2
600
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
5
650
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
500
Featured
See All Featured
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
140
Docker and Python
trallard
47
3.8k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.8k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
170
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
290
Discover your Explorer Soul
emna__ayadi
2
1.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Accessibility Awareness
sabderemane
1
130
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
530
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Transcript
BUILDING…PLEASE WAIT VADYM DEHTEROV 1
AGENDA AGENDA ▸ Build configuration, Xcode target, Xcode scheme ▸
Как llbuild строит build graph ▸ Как генерация кода влияет на build time ▸ Как померять время билда 2
BUILD CONFIGURATION 3
4 Build configuration
5 Build configuration Xcode target
6 Build configuration Xcode target Xcode scheme
LLBUILD 7
АВТОМАТИЗИРУЕТ СЕРИЮ ЗАДАЧ ПО СБОРКЕ 8
LLBUILD ЧТО ТАКОЕ LLBUILD? ▸ Новая билд сисистема от Apple
▸ Вызывает компилятор, линковщик и прочих ребят 9
A.swift B.swift C.swift 10
struct B { let c: C } struct A {
let c: C } struct C { let some: String } A.swift C.swift B.swift 11
struct B { let c: C } struct A {
let c: C } struct C { let some: String } A.swift C.swift B.swift struct Hot { let d: String } 12
ОТ КАКИХ ФАЙЛОВ У НАС МНОГО ЗАВИСИМОСТЕЙ? 13
SOURCERY 14
struct B { let c: String = L.Buttons.finish struct A
{ let c: String = L.Buttons.finish } internal enum L { internal enum Buttons { /// FINISH internal static let finish = L.tr("Localizable", “active_workout.buttons.finish") } A.swift localization.generated.swift B.swift 15
ЧТО ЕЩЕ ЗАМЕДЛЯЕТ? 16
let some = a * b 17
let some = (a / Float(c) + 4) * b
18
let some: Float = (a / Float(c) + 4) *
b 19
BUILD TIME КАК МОЖНО ПОМЕРЯТЬ? ▸ -Xfrontend -warn-long-expression-type-checking=100 ▸ -Xfrontend
-warn-long-function-bodies=100 20
Int(exactly: (steps.reduce(0, +) / Double(steps.count)).rounded()) ?? 0 21
22 defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
КАК ЖЕ СОБИРАЮТСЯ ТАРГЕТЫ В РАМКАХ ОДНОЙ СХЕМЫ? 23 Pods
Framework Main App
РАЗБИВАЙТЕ НА ТАРГЕТЫ 24
LLBUILD ЧТО НАМ ДАДУТ РАЗНЫЕ ТАРГЕТЫ? ▸ Разные generated.swift файлы
▸ llbuild умеет компилировать разные таргеты параллельно 25
ГДЕ ПРУФЫ? 26
XCODE-BUILD-TIME-RENDERING 27
28
29 28 Pods Pods
30 28 Pods Pods Framework Framework
31 28 Pods Pods Main app Framework Framework
TARGETS КАКИЕ ТРУДНОСТИ МОГУТ БЫТЬ? ▸ Код должен быть изолированным
▸ Отдельные тесты ▸ Конфликты в xcproject 32
XCODEGEN 33
СТРУКТУРА ФАЙЛОВ И ПАПОК ИЗ ФАЙЛОВОЙ СИСТЕМЫ 34
35
ЧТО ТО ПОПРОЩЕ 36
WMO VS INCREMENTAL 37
INCREMENTAL 38
WHOLE MODULE OPTIMIZATION 39
WMO VS INCREMENTAL WHOLE MODULE OPTIMIZATION ▸ Быстрее, если собирать
clean build ▸ Ломает инкрементальную сборку ▸ Компилятор делает оптимизации 40
INDEX WHILE BUILDING 41
42
BAZEL ЕСЛИ СОВСЕМ ЖМЕТ 43
BAZEL BAZEL OFFERS THE FOLLOWING ADVANTAGES ▸ Remote cache ▸
Multiplatform 44
ЗАВИСИМОСТИ 45
ЗАВИСИМОСТИ ЧТО С НИМИ ДЕЛАТЬ? ▸ Можно хранить уже собранные
▸ Для Carthage уже есть готовые инструменты ▸ Для CocoaPods есть сторонние плагины 46
SUMMARY О ЧЕМ ГОВОРИЛИ? ▸ Xcode target, Xcode scheme, Build
configuration ▸ Как мерять время билда ▸ Несколько лайфхаков как ускорить билд ▸ XcodeGen ▸ Bazel 47
THATS ALL CREDITS ▸ https://github.com/PaulTaykalo/xcode-build-times-rendering ▸ https://swift.org/blog/new-diagnostic-arch-overview/ ▸ https://github.com/apple/swift/blob/master/docs/ CompilerPerformance.md#diagnostic-options
▸ https://developer.apple.com/videos/play/wwdc2018/408/ ▸ https://github.com/yonaskolb/XcodeGen ▸ https://swift.org/blog/whole-module-optimizations/ 48
49 МОЙ ТЕЛЕГРАМ