为什么fsc比scalac编译程序编译要快

  This(scalac) compiles your source files, but there may be a perceptible delay before the compilation finishes. The reason is that every time the compiler starts up,

it spends time scanning the contents of jar files and doing other initial work before it even looks at the fresh source files you submit to it.

  The first time you run fsc, it will create a local server daemon attached to a port on your computer. It will then send the list of files to compile to the daemon

via the port, and the daemon will compile the files. The next time you run fsc, the daemon will already be running, so fsc will simply send the file list to the daemon,

which will immediately compile the files. Using fsc, you only need to wait for the Java runtime to startup the first time. If you ever want to stop the fsc daemon, you

can do so with fsc -shutdown.

原文地址:https://www.cnblogs.com/25th-engineer/p/11255392.html