https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
j

Jan Stoltman

04/22/2020, 3:40 PM
Hey guys, are there any tips and tricks on how to improve kotlin/native compilation speed? Right now my project takes around 20min to build .framework for ios and just around 3min for android. Is it a common issue for multiplatform projects or is something wrong with my setup?
k

Kris Wong

04/22/2020, 3:48 PM
1. only build release frameworks, 2. remove the test target/source set for arm64
that should cut it in half, in theory. however, 20 min seems excessive
j

John O'Reilly

04/22/2020, 3:59 PM
What version of Kotlin are you using? There were some significant improvements in Kotlin/Native compiler performance in 1.3.70
s

sergey.bogolepov

04/23/2020, 3:26 AM
only build release frameworks
Starting from 1.3.70, debug mode for ios simulator target is way faster than release mode because it is using compiler caches.
👍 1
k

Kris Wong

04/23/2020, 12:52 PM
interesting
i didn't notice because I only build release frameworks 😛
the simulator target is the test target, though, right?
not the framework
s

sergey.bogolepov

04/23/2020, 1:32 PM
iosX64
(iOS Simulator) is a regular target that can be used for any kind of output, including framework. So if you regularly test your iOS app in simulator, producing debug builds of framework instead of release should increase your productivity.
k

Kris Wong

04/23/2020, 1:47 PM
gotcha
i do all my testing through unit tests as functional testing is too inconvenient