dragos / dragos-vscode-scala

Other
253 stars 39 forks source link

EnsimeLangserver consumes too much resources #90

Closed Ddedalus closed 6 years ago

Ddedalus commented 6 years ago

Hi! I've been successfully using your extension for like 2 days building an Akka project with sbt. I've been trying to add some instrumentation to it and now, despite reboot and extension reinstall, as soon as I enable the extension, it goes on crazy, taking 1Gb of RAM and 100% of all CPU cores forever. In the log I've found this at the end:

[2018-07-24 09:53:05,329] DEBUG langserver.core.Connection - Received {"jsonrpc":"2.0","method":"$/cancelRequest","params":{"id":1}}
[2018-07-24 09:53:05,331] ERROR org.github.dragos.vscode.EnsimeLanguageServer - Unknown notification CancelRequest(1)

The problem doesn't occur on other Scala projects, yet occurs on a fresh clone of the same repo. I've tried removing .ensime_cache/ and generating again the .ensime config file.

Any clues on how to debug this?

dragos commented 6 years ago

Unfortunately Ensime is very resource hungry. 1GB is for sure way below what's needed, try giving it 4G at least.

Ddedalus commented 6 years ago

Oh, I didn't limit it anyhow. It is just the size of a java process I observed. Assuming it has to do with mem limit, how do I increase it?

dragos commented 6 years ago

https://github.com/dragos/dragos-vscode-scala/tree/master/scala#configuration

Ddedalus commented 6 years ago

Thanks! It seems it did solve the problem, at least for now

dragos commented 6 years ago

Glad to hear that!