Reputation: 67
After reading slow compiler and Martin Odersky's response, We are so worried to kick start massive ERP product (which is heavily funded that targets a specific Industry) using Scala language.
Edited based on below responses: Splitting into different modules is an option. But that is how one should be doing/planing in any large projects. That just cant be the solution for us.
Martin himself admitted (please see above link) that the Java compiler is 10 times faster than Scala (almost two years ago). This is scary for us, we cant afford waiting for hours while it builds (e.g when we do the clean build) on Dev's machine. Martin clearly said not expect any miracles in future.
Our only option is using continuous compilation. Our intended IDE is IntelliJ Idea.
Some guidance is really appreciated.
Thanks
Mk
Upvotes: 0
Views: 610
Reputation: 167901
Compilation speed is definitely not one of Scala's strengths, but you can potentially limit how much it affects you by structuring a large project as a set of smaller ones with a tree-like dependency (e.g. core utilities; core library which depends only on those utilities; database interface which depends on core and external database library; etc.). Then during most development cycles you can pretend you're working with a smaller project and reserve larger builds for relatively rare events.
My largest project is fairly small (under 5 minutes compile time; 40k LOC), but even so I have it subdivided in such a fashion which means that I rarely have to wait longer than a minute for anything to complete. It does require some discipline to maintain, and some refactoring (as I move common blocks of code from leaves of the tree, where it was fast to recompile, to a root instead of duplicating it), but has worked well for me.
Upvotes: 2