2

Anecdotally, our builds seem slower after enabling these options. I've searched online a bit and tried to do some comparisons but found nothing conclusive. Wondering if anyone knows offhand.

dyross
  • 741
  • 5
  • 18

2 Answers2

8

A great way to answer your own question is to try and measure it. For instance, I tried to compile with SBT (which gives the build time in seconds). I took a medium sized project (78 scala source files) that I tried to compile with and without the flags. I started by doing 3 clean/compile invocations to warm-up the disks (be sure that everything is cached properly by the controller and the OS). Then I measured 3 time the build time to get an average.

For both cases (with and without the flags), the build time was identical. However, it is interesting to note that the first warm-up build was really slow: almost 7x slower ! Therefore it is very difficult to rely on impressions, because the build time will be dominated by the way you access your source files.

paradigmatic
  • 40,153
  • 18
  • 88
  • 147
6

Unless your desktop is a teletype with particularly slow electromechanical relay switches, you're safe - it does the same work either way, so if there were a difference it'd be in how long it takes to display the deprecation/unchecked warnings.

psp
  • 12,138
  • 1
  • 41
  • 51
  • It's suprising how much difference it can make to output stuff to the screen. If I open a git bash under windows and do "time for i in {1..40000}; do echo foobar $i; done", if I minimize the window, it takes an average of 3 seconds. If I leave the window non-minimzed, it takes an average of about 12. Not that I think that this is the cause of the slowness in the compiler :-) But it's interesting nonetheless. – Matthew Farwell Sep 26 '12 at 11:59
  • Which, incidentally, for a large maven build with lots of output from tests > 85k lines, the difference is 4 mins vs 8 mins. – Matthew Farwell Sep 26 '12 at 13:31
  • But if you have 40000 deprecation warnings, you probably have bigger problems than 9 seconds of compile time – Luigi Plinge Sep 26 '12 at 18:15
  • @LuigiPlinge I definitely agree with that. – Matthew Farwell Sep 26 '12 at 21:12