sbt / sbt

sbt, the interactive build tool
https://scala-sbt.org
Apache License 2.0
4.81k stars 937 forks source link

Preloaded sbt is very slow on first start (because of rsync) #3298

Open dragos opened 7 years ago

dragos commented 7 years ago

(See the guidelines for contributing, linked above)

steps

problem

~ $ sbt -help
^\/home/dragos/sbt/bin/sbt-launch-lib.bash: line 160: 31405 Quit                    rsync -a --ignore-existing "$sbt_home/lib/local-preloaded/" "$HOME/.sbt/preloaded"

I expected the preloaded Sbt to be faster on first run, but at least in this case it was significantly slower. I am guessing that my filesystem is slow, but it's still very surprising.

EDIT: It's still slow even after the first run, about 10x slower than 0.13.13

 $ time sbt -help
<snip>
real    0m2.610s
user    0m0.256s
sys 0m0.252s

On my Mac that takes around 200ms, so 10x faster -- that's using 0.13.13 which has no rsync calls.

eed3si9n commented 7 years ago

Thanks for the report. Could you share more about your environment? What OS, file system etc?

dragos commented 7 years ago

Sure, it's Ubuntu 16.04.2 LTS with nfs-mounted home.

jvican commented 7 years ago

This is a little bit concerning. Can we disable preloaded under a flag for those users whose file systems may be connected to networks or external servers?

Alternatively, can we use find a faster solution?