Hacker News new | ask | show | jobs
by jpavel2 1680 days ago
I write a variety of CLI tools for my own use in Java.

On this low-end Chromebook (Samsung Chromebook 3 with a Celeron N3060 @1.60GHz) I can start the JVM, load the classes for my CLI program, and print a help message,

    jpavel@penguin:~$ time rcr -h
    Usage: RCloner <config path> get|put <entry> [args]
           RCloner <config path> list
    
    real    0m0.316s
    user    0m0.208s
    sys     0m0.126s
in less than 1/3 of a second. And this is with stock openjdk version 1.8.0_302, which doesn't include the startup time improvements of Java 10 & 12.

Sure, I wouldn't write utilities meant to be piped one into another, but for standalone CLI tools, the JVM startup time isn't prohibitive at all.

1 comments

I think he was talking more about serverless functions, where 300ms longer for answering an HTTP-request would be pretty long.
See GraalVM: https://quarkus.io/