GraalVM Native Image: Hello World

Sdílet
Vložit
  • čas přidán 4. 11. 2021
  • A quick introduction to the basics of GraalVM Native Image ahead-of-time compilation.

Komentáře • 21

  • @renatoaraujo6108
    @renatoaraujo6108 Před 4 měsíci +2

    Incredible!

  • @thesoftwareengineer_
    @thesoftwareengineer_ Před 2 lety +9

    My God why have I never heard of this. This makes my code so fast.

  • @kamelha6445
    @kamelha6445 Před rokem

    This get started app in Community edition doesn't work as of today

  • @David-iq1kd
    @David-iq1kd Před 10 měsíci

    How might you use this to create a mobile application? Are there mobile targets available?

    • @renatoaraujo6108
      @renatoaraujo6108 Před 4 měsíci +1

      What I heard is that Android Apks are written in Java but they don't really use JVM.

  • @hamu_sando
    @hamu_sando Před rokem

    I take it that you lose the ability to use tools like JFR and library features like Prometheus jvm metrics.

  • @BharathMarrivada
    @BharathMarrivada Před 2 lety +1

    Native image is very fast

  • @chrisalexthomas
    @chrisalexthomas Před rokem +6

    16MB for an executable that prints a single string to the terminal... :O

    • @praneetmehta
      @praneetmehta Před rokem +12

      This number shouldn't scale linearly. My assumption is even if you were to build a more complex program it wouldn't be much farther away from 16mb ( considering the dependencies for the program remain fairly consistent )

    • @chrisalexthomas
      @chrisalexthomas Před rokem

      ​@@Hasibix congratulations on missing the entire point of my comment.

    • @boilingsoup
      @boilingsoup Před 8 měsíci

      ​@@chrisalexthomasyou can build a better JVM compiler? Impressive

    • @ashraf.50150
      @ashraf.50150 Před 8 měsíci +2

      Lol, try node or deno or bun, you're gonna get about 60mb to 85mb😢

    • @chrisalexthomas
      @chrisalexthomas Před 8 měsíci

      @@ashraf.50150 true, should have used golang or rust instead ;)
      the whole premise of java, to write once run anywhere, isn't useful in 2023
      we can just compile the binary in a CI/CD pipeline for the target architecture if we need to
      compiler tooling is so much better than 1996 when java was thought to be the best idea ever, now it's just a remnant of history and nobody needs it anymore

  • @krellin
    @krellin Před 2 lety +3

    this is a bad idea, you are throwing away all the performance benefits for what? startup time? this will never have the peak performance of JIT after it optimised your code and most importantly it will never have the latency characteristics that you can have with normal jvm...
    I dont know how you handle GC and a lot of other things but i do not see how this is useful beyond simple things like cli apps or some quick executable that you wanna share and let it just run without someone worrying about jvm and how to run a jar file...

    • @freeideas
      @freeideas Před rokem +7

      Yes, well said. A large-ish application will probably run faster over time on a JVM and will be far easier to maintain as a set of jar and/or class files. But ability to distribute a small command-line executable without having to worry about requiring a massive JVM... very nice.

    • @lukeusherwood2525
      @lukeusherwood2525 Před rokem +9

      I think use in cloud / serverless (not my area) has a lot of people very excited, because long-running but inconsistently loaded processes turn out very costly. If you can spin up/down apps fast, while still maintaining good response time/latency, you can save a lot.

    • @anim4852
      @anim4852 Před rokem +14

      In Kubernetes world, pods/containers are constantly shutdown or restarted. This is required for those scenarios

  • @JerryDoe
    @JerryDoe Před rokem

    Works in Linux, doesnt work in Windows.... FU and byebye with your vaporware