Newbie: Why is compiling so sloooow ?

Just started playing with the Scala plugin and the most trivial of code i.e. a bunch of printlns just takes way too long to compile. I'm talking about on i7 and i5 machines. Also is there no incremental compile ? i.e. a simple mod requires a re-compilation of everything , maybe I'm used to the instant gratification I get from my Smalltalk IDE but I think that maybe I just don't have something configured appropriately in IDEA.

Also I noticed some posts about FSC ? so what is FSC?  which apparently helps to cut down compile time so apparently there might some sort of issue here.

Kindly, somebody just educate me.  

thanks

5 comments

Slow highlighting is our headache. Slow compilation is scala core team headache.
However for compilation we have two things, which can do it much faster.
1. Incremental compilation (per file). This is enabled by default. In big projects this is great.
2. Fsc support, please read blog post http://blog.jetbrains.com/scala/2011/10/05/real-fsc-support/

Best regards,
Alexander Podkhalyuzin.

0

Incremental compilation is enabled by default ? Really ? Again, my test was trivial and changing one file , took an inordinate time to recompile. Perhaps I have done something to turn it off.

Thank you for the link on FSC. When I first looked at the acronym for a second I thought it might mean "F sharp compiler" i.e. another functional language hybrid I'm playing with. I'll go look at what it is now.

-Charles

0

sorry , but is SBT integrated with the IDEA Scala plugin ? Can somebody point me to documentation to that effect.

thanks

0

We have third-party plugin for SBT development: http://plugins.intellij.net/plugin/?idea&id=5007
Compilation unit for incremental compilation is file, so if you change one file, you will recompile this file anyway.

Best regards,
Alexander Podkhalyuzin.

0

thanks, I'm so used to the compilation unit being the method in Smalltalk . So I then suppose that a good practice in Scala is to dedicate one file per class ?
I'll check out the link.

0

Please sign in to leave a comment.