scala compilation

I've begun exploring using scala in a project which already uses Java and Groovy (predominately Java).  I'm on the latest v9 community build and the latest scala plugin.  Currently, I only have three scala files.  Whenever I change a file and recompile, it takes 7 to 10 seconds and seems to parse every java file in the project (2300+ files).  This is 7-10 times longer than the normal compile/test cycle I'm used to.

In fact, unless I uncheck 'compile scala files first', IntelliJ exhibits the same behavoir when compiling Java files in the same module.

Are other people seeing this?


Maybe the Scala parser parses also the Java files because there might be a mutual dependency between Java and Scala files.  If your Java files do not depend on Scala files I would just uncheck the option 'compile scala files first'.

Additionally you can try to speedup the compilation process by using the fast scala compiler (check Settings->Compiler->Scala compiler->Use fsc (fast scalac)).


the scala compilation speed is puzzling me. i switched of the fsc, but it didn't get much slower. a month ago, when i first used the fsc, it was a great improvement. did the plugin get better?


It may be a bug in the dependency tree.  My project uses maven and currently has two modules, alpha and proto.  Right now the scala files are in proto, which depends on alpha.  The proto module is for prototyping activities and brings in some non-production libraries, scala being one.

However, aside from the module dependency, the actual scala files themselves are bare-bones.  They don't use any non-built-in classes at the moment.  They would in the future, but right now I'm just using them to learn the language.

I'm not sure fsc would help because the issue seems to be before the actual compilation takes place.  It seems to scan all the source files in both alpha and proto.  It's hard to tell since the names go by so fast and there is no logging.

I'm willing to turn on debugging to help figure this out - any scala-plugin developers read this forum?


Please sign in to leave a comment.