https://kotlinlang.org logo
Title
w

wineluis

06/10/2017, 2:45 PM
the compile time is so bad in kotlin. 25s for measly 300 lines of code + 1 library. insane.
j

janvladimirmostert

06/10/2017, 2:45 PM
wineluis: what OS are you on?
w

wineluis

06/10/2017, 2:46 PM
arch linux
j

janvladimirmostert

06/10/2017, 2:47 PM
ok, there was an issue on OSX where host lookups took forever which made compile times super long, for a simple hello world, it also took 25+ seconds. After putting ::1 and localhost in the hosts file, it went down to half a second
might be something similar ?
w

wineluis

06/10/2017, 2:47 PM
golang compiles in 5 seconds with 20-40 times the size
shit lang
idk
im using gradle
maven is also terribly slow
j

janvladimirmostert

06/10/2017, 2:48 PM
add the following in your /etc/hosts file:
127.0.0.1   localhost machinename.local 
::1         localhost machinename.local 
0:0:0:0:0:0:0:1 localhost machinename.local
where machinename is whatever you see in your terminal before the blinking cursor
my compile time is around 2 seconds on a large project
w

wineluis

06/10/2017, 2:50 PM
wtf
i check
j

janvladimirmostert

06/10/2017, 2:51 PM
is it making a difference ?
w

wineluis

06/10/2017, 2:52 PM
do I need to restart something ?
j

janvladimirmostert

06/10/2017, 2:52 PM
nope, should just start working
maven tries to resolve certain things at machinename.local and for some reason on certain OSes, this takes extremely long.
w

wineluis

06/10/2017, 2:55 PM
its at least 5 seconds now
j

janvladimirmostert

06/10/2017, 2:55 PM
ok, that’s a huge improvement already
now switch on incremental compile
w

wineluis

06/10/2017, 2:55 PM
thats active by default
j

janvladimirmostert

06/10/2017, 2:56 PM
I compile from command line, that takes in the millisecond range for something that takes several seconds in IntelliJ
see if there’s a Kotlin package available for Arch Linux, I know OSX got one via HomeBrew
w

wineluis

06/10/2017, 2:57 PM
but youd evelop with intellij ?
i hate this ide
j

janvladimirmostert

06/10/2017, 2:58 PM
In your maven properties add:
<properties>
        <!-- This option is experimental, if you're having build issues, disable it -->
        <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
    </properties>
IntelliJ is the best IDE around
👍 4
d

Dmitry Kandalov

06/10/2017, 3:00 PM
why do you hate it?
w

wineluis

06/10/2017, 3:00 PM
its overweight and the vim plugin sucks
d

Dmitry Kandalov

06/10/2017, 3:02 PM
no idea about vim plugin because I don’t use it, but by “overweight” I guess you mean it’s slow?
j

janvladimirmostert

06/10/2017, 3:04 PM
Compared to Netbeans which doesn’t have a Vim plugin last time I checked and Eclipse which has a buggy one, IntelliJ’s one is pretty close to running Vim straight in the command line.
w

wineluis

06/10/2017, 3:06 PM
intellij fucks it up if you use mouse to copy
j

janvladimirmostert

06/10/2017, 3:08 PM
use
v
for visual mode,
y
for copy and
p
for paste You’re also supposed to be in insertion mode before you paste, regular VIM does the same.
w

wineluis

06/10/2017, 3:08 PM
in vscode you can use the mouse to copy paste properly and use y and p
j

janvladimirmostert

06/10/2017, 3:09 PM
sounds like a cool feature, log a feature request: https://youtrack.jetbrains.com/issues/VIM
w

wineluis

06/10/2017, 3:12 PM
y
thank you
i think it compiles a bit faster now
👍 1
o

orangy

06/10/2017, 4:31 PM
@wineluis I would strongly ask you to watch your language. If you don’t like something it’s fine, but you need to put arguments on the table, not rude words.
2
👍 3