Is there any performance penalty when running a scala program with sbt run instead of using sbt assembly and creating an executable jar?
Asked
Active
Viewed 229 times
1 Answers
3
Yes, there is. In the worst case, sbt will have to compile your project before running it.
Regardless of compilation, sbt runs the program after forking. That incurs overhead as well.

tobym
- 1,354
- 1
- 10
- 11
-
I'm interested in building and running a Scala application from within a docker container. Do you think it's worth it to use something like `sbt-assembly` to generate a jar and run that in the container? Or should I just use `sbt run`? – advait May 27 '15 at 23:48
-
2I use `sbt-assembly` because it locks in your dependencies. `sbt run` may need to re-resolve dependencies and that may require access to some nexus repo, or network access in general. Also, sbt-assembly forces you to deal with dependency conflicts early, whereas sbt run doesn't. – tobym Jun 02 '15 at 19:48