4 ms·
the whole "live reload" capability of play is a gimmick because in real life making a code change in a medium to large project is like watching grass grow - eve
by mentaat 13y ago
the whole "live reload" capability of play is a gimmick because in real life making a code change in a medium to large project is like watching grass grow - every change you make takes minutes to compile and reload.
- atto 13y agoHow large? We have well over 100k lines of code (Scala), and it's not a serious issue. The sbt 0.13 incremental compiler is much better than 0.12's. Also, using sbt multi-projects helps quite a bit (even when running all at once).
- Cless 13y agoI hope you're right. I really do.
- mentaat 13y agomuch smaller - around 25k+. i gave up after becoming frustrated by the atrociously compile times. haven't used sbt .13 though but i don't expect it to solve miracles given how inherently complex the scala compiler code is. according to paul phillips, core scala committer, there are large portions of the compiler code that nobody touches because nobody understands it. and as per him this along with bunch of other limitations guarantees that you won't see huge gains in compile times unless they rewrite the whole compiler...
- frowaway001 13y ago> there are large portions of the compiler code that nobody touches because nobody understands it Could you link to one of those "large portions"? > and as per him this along with bunch of other limitations guarantees that you won't see huge gains in compile times unless they rewrite the whole compiler... You mean like https://groups.google.com/forum/#!topic/scala-internals/6HL6lVLI3bQ https://groups.google.com/forum/#!topic/scala-internals/6HL6... ?
- virtualwhys 13y agoNice find! Didn't know they were so far along with Dotty. Will be interesting to see how a potential merge works out (assume Scala 2.13 at the earliest).
- virtualwhys 13y agoIf @1 second recompile entails watching grass grow, you have some serious miracle grow on hand ;-) SBT sub projects are the ticket to sane Scala development. If you just lump everything under a single project, sure, then it's grass growing time o_O Modularize your code and then play> ~run (i.e. incremental compilation) and relax -- the "Scala is slow" mantra is so 2011.
- noelwelsh 13y agoThe Scala compiler is slow. However with some care over code organisation you can limit what needs to be recompiled in most cases. Read and heed this blog post: http://www.chrisstucchio.com/blog/2014/bondage_and_discipline.html http://www.chrisstucchio.com/blog/2014/bondage_and_disciplin...
- _retronym 13y agoSBT 0.13.2 will ship with a smarter incremental compiler: https://github.com/sbt/sbt/issues/1010 https://github.com/sbt/sbt/issues/1010 This avoids pessimistic recompilation in many cases, in particular when editing the routes files in Play. Test results: https://gist.github.com/jroper/6374383 https://gist.github.com/jroper/6374383