Re: Re: Fast execution of scripts
Lex Spoon <[email protected]>
| Newsgroups | gmane.comp.lang.scala |
|---|---|
| Message-ID | <CALM2SnZ0r-PAJ_RJgLiy0GKXnaDQ5G=cS=Epiy5aR9OQMW=+gw@mail.gmail.com> |
On Sun, Feb 15, 2015 at 12:19 PM, SpiderPig <[email protected]> wrote: > But I want to be able to change the script and still have it start up > nearly instantly. The default script runner doesn't do that no matter what > arguments you pass to it. > The script runner already does what you suggest! Here is the commit that added it in 2006: https://github.com/scala/scala/commit/31ea434a66b6e300c4c372fd4c72919a5f0bceb3 At the head of 2.11.x, here is a good starting point for reading this code: https://github.com/scala/scala/blob/2.11.x/src/compiler/scala/tools/nsc/ScriptRunner.scala#L63 I just tested on my machine using 2.11.2, and the functionality is still working properly. Here are the timings I get to compile and run a small script: first run: 2.4 seconds second run: 0.6 seconds third run: 0.5 seconds using -save: 0.2 seconds Perhaps it isn't happening on your machine, or perhaps you can find a way to trim the timings down even further. Either way, I am sure that your help on improving it would be welcome. Lex -- You received this message because you are subscribed to the Google Groups "scala-language" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.