0

recently I worked on a 120MB XML subset of the Wikipedia dump with the dbpedia extraction framework in Scala. I found that REPL uses much more system resources than the compiled program: 2GB vs. 600mb RAM and 3 cores vs. 1 core.

I know that REPL is actually compiling internally. However, I just wrote a few lines with one reference to the framework. So why is the difference so big?

Update

I found the problem. I create an iterable on top of the Wikipedia dump. REPL then iterates over it to out put it. If I create a view that does not happen.

Community
  • 1
  • 1
Karsten
  • 882
  • 6
  • 18

1 Answers1

0

One REPL inefficiency is that it wraps everything in a new object. Read more about it here for example. Memory usage might depend on JVM args that you pass to REPL and your app when you start them.

Community
  • 1
  • 1
yǝsʞǝla
  • 16,272
  • 2
  • 44
  • 65