| > just not happy with the JVM memory reqs I'm curious if you did any measurements and what you prefer instead. The managed heap is very efficient. I have a web server (built in Scala) configured on my own VPS to run with a 10-100 MB heap. To this you add the JVM's memory used for managing OS threads, opened sockets, JNI, GC overhead and I end up with a process using 190 MB (RES), which is reasonable for a server-side process, because you can actually do a lot in it, Java processes being able to be fat. In my experience a well grown Java process will be much more efficient and predictable in terms of memory used than Node.js, PHP, Ruby, Python, at the very least. The only problem I've experienced is the startup time, plus depending on use case I might prefer native binaries. GraalVM looks promising. Scala.js is useful on the sever for example if you need to work with "serverless" tech, e.g. AWS Lambda, for which startup time is important. |
There is GraalVM but compilation takes a relatively long time even compared to a C++ project and as soon as you use features that it doesn't support it will fail to work which means you are stuck with Java because you don't want to risk using a language that doesn't officially support GraalVM (groovy kotlin etc).