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

Executable size regression in 21.1 #3280

Closed
kirillp opened this issue Mar 15, 2021 · 7 comments
Closed

Executable size regression in 21.1 #3280

kirillp opened this issue Mar 15, 2021 · 7 comments
Assignees

Comments

@kirillp
Copy link

kirillp commented Mar 15, 2021

Describe the issue
My simple app compiled by graalvm-ce-java11-21.0.0 is 7500k executable
And if compiled by graalvm-ce-java11-21.1.0-dev - 8M executable

So executable is 500k size bigger, have no differences in source code.

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

Use trivial System.out.println(); program
Compile it using graalvm-ce-java11-21.0.0 and graalvm-ce-java11-21.1.0-dev

Describe GraalVM and your environment:

  • GraalVM version

  • GRAALVM_VERSION="21.1.0-dev" JAVA_VERSION_DATE="2021-01-19"

  • GRAALVM_VERSION="21.0.0" JAVA_VERSION="11.0.10"

  • JDK major version: 11

  • OS: Windows

  • Architecture: AMD64

@munishchouhan
Copy link
Contributor

@kirillp please provide the reproducer

@munishchouhan munishchouhan self-assigned this Mar 19, 2021
@kirillp
Copy link
Author

kirillp commented Mar 19, 2021

What is not clear?
To reproduce compile a trivial single line program.
System.out.println(); with 21.0 and 21.1

@shelajev
Copy link
Contributor

I assume this is reproducible with the hello world:

public class Main { 
  public static void main(String[] args) {
     System.out.println("Kirill, is this it?"); 
  }
}

@kirillp please confirm if that's the case, thank you.

@kirillp
Copy link
Author

kirillp commented Mar 19, 2021

Right, the issue here is that we see +500k grow in executable size

@jaikiran
Copy link
Contributor

FWIW - there's a similar discussion going on right now related to this here #3422. I see that you created this issue on 15 March and were using 21.1.0.dev version. The commit/change which is being discussed in the other issue was done on March 10, so it's likely that what you are seeing here is the same as what's being discussed in that other issue.

@borkdude
Copy link

I see a 3MB increase when upgrading babashka to 21.1.0.

The diff shows that classes from sun.security.pkcs11, javax.security.auth, sun.security.util are being pulled in extra.

used_classes_bb_20210522_140854_21.0.0.txt

used_methods_bb_20210522_141515_21.1.0.txt

diff.txt

@wirthi
Copy link
Member

wirthi commented Nov 6, 2024

Closing this older ticket. Note we now have the -Os argument to optimize for size, if that is your main pain point. https://www.graalvm.org/jdk23/reference-manual/native-image/guides/optimize-for-file-size/

@wirthi wirthi closed this as completed Nov 6, 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

7 participants