![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@xuwei_k Have you tried 2.10.2 though? Spire compiles 5x faster on 2.10.2 than 2.10.4.
2014-04-24 02:58:34![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@milessabin @xuwei_k I just tested it from clean recently. I'm not sure what's going on, but it's one reason I didn't update to 2.10.3.
2014-04-24 03:01:25![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
nscala-time、何度か繰り返し計測してみたけど、2.10.4で15s、2.11.0で18sと遅くなってるなあ。何か計測時のセッティング間違えたかなあ。
2014-04-28 22:31:18![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@kmizu 設定読みこむ時間・・・?どうやってやったんですか? 自分は sbt clean update compile として、最後のcompileの時間だけ計測という方法でやりましたが。
2014-04-28 23:22:00![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
Windows 7 UltimateとUbuntu Linux 14.04でnscala-timeのコンパイル時間を比較したのだが、3秒くらいWindows 7の方が速い気がするのは気のせいか。
2014-04-28 23:23:29![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@xuwei_k はい。自分もそうしました。より正確には、 $ sbt clean $ sbt update $ time sbt compile ですかね(sbtコンソール中で続けてしなくてもresolveの結果はキャッシュされてるみたいなので)。
2014-04-28 23:25:16![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@kmizu @xuwei_k It's actually `update` that takes a ton of time, generally, after a clean.
2014-04-28 23:26:47![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@xuwei_k timeコマンドの結果はbuild.sbtを読み込む時間その他諸々含まれてしまいますね(計測時間としては、sbtの表示時間任せではなく、timeコマンドを使ったスクリプト作って繰り返し計測したいのが悩ましい)。
2014-04-28 23:27:15![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@kmizu @xuwei_k @eed3si9n_ja counted upwards of 30 reads of the same file by ivy on resolution..
2014-04-28 23:27:23![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@kmizu なるほど。updateのあと"sbt compile"で起動やり直すと、起動してコンパイル始めるまでの時間がコンパイル時間に比べてある程度あったら、誤差増えてあまり正確に計測できなそうですね。そもそもnscala-timeはあまり大きくなくてコンパイル時間短いですし
2014-04-28 23:29:25![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@jsuereth @xuwei_k @eed3si9n_ja Thanks! I'm surprised with you reply :-) I understood that my way was wrong in fact.
2014-04-28 23:32:12![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@kmizu @xuwei_k @eed3si9n_ja Directly calling update means you hit the slowness EVERY TIME. We have a cache to try to prevent that.
2014-04-28 23:33:35![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@jsuereth @xuwei_k @eed3si9n_ja BTW, how do you measure the compilation time of a library ? I want the way as the following:
2014-04-28 23:34:24![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@xuwei_k それでもコンパイル時間15s~18sくらいあるから(sbtの表示時間)、計測するには十分なくらいかなとは思うんですよね。
2014-04-28 23:35:56![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@kmizu @xuwei_k @eed3si9n_ja -Dsbt.task.timings=true will give you detailed task timing information, sorted by most expensive tasks
2014-04-28 23:37:39![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@kmizu @xuwei_k @eed3si9n_ja That should tell you how long compile task itself takes.
2014-04-28 23:37:51![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@jsuereth @xuwei_k @eed3si9n_ja * easily repeatable * high precision * portable
2014-04-28 23:42:01![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@kmizu @xuwei_k @eed3si9n_ja Also, precision is a bit rough to do. You need to read a high precision timer. not sure what the JVM uses.
2014-04-28 23:43:25![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@kmizu @xuwei_k @eed3si9n_ja But you should get decent precision for long tasks and terrible precision for short tasks (<1 ms).
2014-04-28 23:43:56