开发者

scala REPL is slow on vista

I installed scala-2.8.0.RC3 by extracting the tgz file into my cygwin (vista) home directory. I made sure to set $PATH to scala-2.8.0.RC3/bin.

I start the REPL by typing:

$ scala
Welcome to Scala version 2.8.0.RC3 (Java HotSpot(TM) Client VM, Java 1.6.0_20).
Type in expressions to have them evaluated.
Type :help for more information.

scala>

Now when I tried to enter an expression

scala> 1 + 'a'

the cursor hangs there without any response. Grant开发者_如何学Goed that I have chrome open with a million tabs and VLC playing in the background, but CPU utilization was 12% and virtual memory was about 75% utilized. What's going on ? Do I have to set the CLASSPATH or perform other steps.


There is an enormous start-up cost for the REPL (which includes the compiler, of course), but it does not use fsc, it is self-contained within a single JVM. Using it gradually causes JVM bytecode to be converted to native code, after which it's very fast.


Have you tried sending Ctrl+Break to your Scala process ?

For a Java process this will force a dump of all the thread states and you'll be able to see what each thread is doing, what it's waiting on, if it's deadlocked etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜