:mega::mega::mega: Hi, All! Could you please parti...
# javascript
b
📣📣📣 Hi, All! Could you please participate in the small poll? Do you use gradle Incremental Compilation for Kotlin/JS? 👌 🚫 🐛 — doesn’t work to me — I don’t know about such possibility
🐛 2
👌 3
21
🚫 4
l
How to check it? ) Add "idk" variant )
b
I’ve added option for your case
l
@bashor https://kotlinlang.org/docs/reference/using-gradle.html "Starting with Kotlin 1.1.1, incremental compilation is enabled by default."
b
In the case if you didn’t know about such possibility: It exists, but it’s disabled by default now for Kotlin/JS (unlike Kotlin/JVM) and should be enabled by setting
kotlin.incremental.js=true
in
gradle.properties
or
local.properties
👍 4
@lewik until 1.1.60 we didn’t have IC for Kotlin/JS, so this part of doc only about JVM part
d
wow, so that is why it is so slow 🙂
b
@gildor @Jurriaan Mous could you please share your experience?
j
I added
kotlin.incremental.js=true
to the gradle.properties. It now prints
Using experimental Kotlin/JS incremental compilation
while compiling JS code. And without the
kotlinCompile2Js
task runs in 7+ sec and with it turned on to ±1.5 sec per compile after a small change.
👍 3
🙏 1
l
Have about 15+-3 sec in both cases after any size of change. Not SDD. A lot of code.
b
at least it’s not worse 🙂
Note: right you will get maximum profit from incremental compilation in leaf modules. And on other modules in most cases it you will not get any profit. But we going to improve this case too.
^^^ @lewik
🆗 1
@lewik we would happy to look on your project and investigate your cases if it’s possible. We can sign NDA if it’s required.
@lewik could you please check that it’s not non-leaf module case?
l
@bashor We will show code to JB in near future (with NDA, sorry 🙂 ). That will be awesome. I will check it. I just need to find non-leaf...
👍 2
@bashor 7 sec on leafs. Up to 20 on non-leafs. I should tell you, that I am on VirtualBox + not SSD.
b
@lewik could you please (re)measure and share results for exactly same cases with out IC?
l
@bashor Ok, I will. Not right now.
🆗 1
@bashor leaf modules is classes that nobody imports or gradle projects?
b
@lewik gradle projects which doesn’t use as dependency by any other
l
Ok, got it.
Is there any optimization within module? I have 7 to 20 within module. I thought it depends on class hierarchy.
b
Does it mean that your leaf-module (actually it’s project in gradle) is compiled 7 sec with IC and 20 sec with out IC on the same case?
Is there any optimization within module?
yes, it’s IC 🙂
I thought it depends on class hierarchy
Actually the result depends on your dependency graph