Now that java process is back down to 0% cpu, but the whole system is
still running extremely slow. System monitor doesn't show any
processes chewing up cpu.
Every time I edit & save a .scala file, everything (including the
parsing & type checking in inferior-ensime-server) seems to run slower
& slower.
That java process started at 1.5 GiB, went up to 1.6 GiB after the
first save and is now at 1.7 GiB after the 2nd save. The type checking
for the 2nd save went on for about 10 minutes.
java -classpath ... -Xms256M -Xmx1512M ... org.ensime.server.Server
/tmp/ensime_port.4348
1512M is about what the ensime java process was using during the
slowdowns. Next hypothesis is that ensime is running out of heap
space. I tried setting the ENSIME_JVM_ARGS env var as per the ensime
user manual:
$ echo $ENSIME_JVM_ARGS
-Xms1024M -Xmx3072M
But this had no effect the next time I started ensime. What is the
best way to give ensime more heap space?
Compiler errors also seem to take a lot longer to show up now.
Introducing an error into a 300 line unit test and then saving takes
5+ secs to highlight the error. Seems like it used to be almost
instantaneous.
So I think this shows that 1) slowdowns are a result of ensime running
out of heap, and 2) ensime heap usage does grow over time, possibly a
leak, caused by simply editing & saving files.
Thanks,
Zach