Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Pre-compiled scripts start up really slowly #322
haoyi-mbp:~ haoyi$ vim script.scala haoyi-mbp:~ haoyi$ cat script.scala println(1) @ println(2) haoyi-mbp:~ haoyi$ ~/amm script.scala 1 2 haoyi-mbp:~ haoyi$ time ~/amm script.scala 1 2 real 0m2.344s user 0m6.381s sys 0m0.359s
This may seem related to #235, but really isn't: in that issue the main cause of slowness is the Scala compiler. Here, the scripts are already compiled and cached. There is no reason they shouldn't be able to start executing at full speed immediately upon request, and a compiler shouldn't be necessary. We need to investigate what's taking so long and remove it or speed it up
This has been basically solved, with @coderabhishek's work over GSOC. The above snippet starts in about 0.5 seconds.
Currently, the startup profile looks like it's dominated by classloading time:
So presumably any perf-perf optimizations wouldn't have much of an effect, and we'd need to reduce the amount of classes being loaded.
Anyway, this issue can probably be considered closed