Note that there are some explanatory texts on larger screens.

plurals
  1. POWill running everything from RAM disk speed up scala compile time?
    primarykey
    data
    text
    <p>Scenario:</p> <p>The machine I use for development have 32Gb of DDR3 RAM, i7 3770, SSD. The project is large, Scala compiles fast most of the time during incremental compilation but sometimes a single change leads to recompilation of hundreds of files, it then take some time to compile all and some good time for jrebel to reload all changed files.</p> <p>Question:</p> <p>Will putting everything on a RAMFS (Mac) make compile and jrebel reload significantly faster?</p> <p>My plan was to put everything directly related to the project in a RAMFS partition ( .ivy, project source, .sbt, maybe even copy JDK. etc). I would create a script to do all that in the boot or manually, that won't be a problem. Also, I would setup file sync tasks, so, losing a change won't be a concern in case of a OS failure.</p> <p>Updates:</p> <ol> <li>log says around 400 among java and scala sources are compiled after a clean.</li> <li>after changing a file in a core module, it recompiles 130 files in 50s.</li> <li>jrebel takes 72s to reload after #1 and 50s after #2</li> <li>adding -Drebel.check_class_hash=true made jrebel reload instantaneous after #2.</li> </ol> <p>I am quite happy with these results, but still interested on how to make scala compilation even faster, since cpu usage gets at most 70% for just about 5 seconds in compilation process that takes 170s, overall cpu usage during the compilation is 20%.</p> <p>UPDATE:</p> <p>After putting JVM, source, .ivy2 and .sbt folders on RAMDISK, I noticed a small improvement on compile time only: from 132s to 122s ( after a clean). So, not worth the trouble.</p> <p>NOTE:</p> <p>That is excluding the dependency resolution, since I using <a href="https://stackoverflow.com/questions/17190755/why-sbt-runs-dependency-resolution-every-time-after-clean">this approach</a> to avoid losing dependency resolution after a clean.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload