SBT 是否使用 Fast Scala Compiler (fsc)? [英] Does SBT use the Fast Scala Compiler (fsc)?

查看:34
本文介绍了SBT 是否使用 Fast Scala Compiler (fsc)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SBT 是否使用 fsc?

Does SBT make use of fsc?

出于测试目的,我正在一台相当慢的 Ubuntu 机器(Atom N270)上编译一个 500 行的程序.三个连续的编译时间分别为 77s、66s 和 66s.

For test purposes I am compiling a 500-line program on a fairly slow Ubuntu machine (Atom N270). Three successive compile times were 77s, 66s, and 66s.

然后我从命令行使用 fsc 编译文件.现在我的时代是 80 年代、25 年代、18 年代.更好的!这对我来说意味着 sbt 使用 fsc.我对吗?如果是这样,为什么不使用它?

I then compiled the file with fsc from the command line. Now my times were 80s, 25s, 18s. Better! That implies to me sbt is not using fsc. Am I right? If so, why doesn't it use it?

我可能会尝试让 sbt 显式使用 fsc 进行编译,但我不确定我会弄清楚配置.有人做过吗?

I may try getting sbt to explicitly use fsc to compile, though I am not sure I will figure out the config. Has anyone done this?

推荐答案

当您以交互方式(使用或不使用其连续构建模式)运行快速 Scala 编译器时,SBT 无法从快速 Scala 编译器中受益,因为 Scala 编译器类已加载并获得预热"和 JIT-ed,这是 fsc 的全部优势.

SBT cannot benefit from the Fast Scala Compiler when you run it interactively (with or without using its continuous build mode) because the Scala compiler classes are loaded and get "warmed up" and JIT-ed, which is the entirety of fsc's advantage.

这篇关于SBT 是否使用 Fast Scala Compiler (fsc)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆