Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the size of graal compiled program #8570

Closed
865986682 opened this issue Mar 14, 2024 · 1 comment
Closed

the size of graal compiled program #8570

865986682 opened this issue Mar 14, 2024 · 1 comment

Comments

@865986682
Copy link

Describe the issue
There is a graal compiled binary program called service, and it is three times the size of the Original service-0.0.1-SNAPSHOT.jar.
Is this normal?

image

Steps to reproduce the issue
Please include both build steps as well as run steps

  1. A maven project used native-maven-plugin
  2. mvn -Pnative native:compile

Describe GraalVM and your environment:

  • GraalVM version : GraalVM 17
  • JDK major version: 17
  • OS: ubuntu 22.04
@fniephaus
Copy link
Member

Is this normal?

As always, it depends but it certainly is possible. I'm assuming that this is a fat JAR? You may want to take a closer look at the build output, which provides you with more insights where those 264MB come from. It's possible that the binary contains a lot of resources, or even too many resources in case of misconfiguration. It's unlikely but, of course, also possible that you hit a bug in GraalVM. Also, the comparison is somewhat unfair because a) the JAR can be compressed whereas the binary isn't (how large is it when you zip it?) and b) the JAR needs a JVM to run whereas the binary is self-contained.

Hope this helps!

-- Fabio

@fniephaus fniephaus self-assigned this Mar 14, 2024
@fniephaus fniephaus added question and removed bug labels Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants