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

Feature Request: GraalVM Native Image #19

Closed
tekanic opened this issue Mar 15, 2022 · 3 comments
Closed

Feature Request: GraalVM Native Image #19

tekanic opened this issue Mar 15, 2022 · 3 comments

Comments

@tekanic
Copy link

tekanic commented Mar 15, 2022

Add an option to the CLI tool to build executable using GraalVM Native Image.

@AndyObtiva
Copy link
Owner

@tekanic
Copy link
Author

tekanic commented Mar 15, 2022

I was curious to see if you experimented with GraalVM Native Image to see if it improved startup time.

@AndyObtiva
Copy link
Owner

Glimmer DSL for SWT JRuby startup time has already improved significantly with the new Mac M1 Chip (having 8+ cores) as apps start in about 3-4 seconds on it instead of the 5+ seconds it took on older systems, rendering startup time practically a non-issue.

I expect startup time to become even less of an issue on the faster CPUs that are coming out nowadays.

And, any Glimmer DSL for SWT software built for the enterprise to start at the beginning of the day and remain running all day does not suffer from any real practical issues regarding JRuby startup time.

Concerning GraalVM, as far as I know, it only supports TruffleRuby, not JRuby (which is a lot more mature and popular in the software community), so it is a non-starter.

Also, the GraalVM Native Image makes a closed-world assumption that complicates building native executables significantly by requiring you to have the Java source code for SWT, so it is not as simple as 1-2-3 or as convenient as Glimmer DSL for SWT's current glimmer package command since it puts the onus on the developer to meet all of GraalVM Native Image's closed-world assumption requirements for their application.

Moreover, GraalVM Native Image currently has lower peak performance because it lacks some optimizations that are only available in the standard JDK.

Furthermore, the GraalVM Native Image Generator is not an ahead-of time compiler for Ruby code, yet only the Java components.

Right now, GraalVM Native Image seems like experimental immature software to me that is not worth the effort of supporting. If anything changes in the future, I would be happy to explore.

Please keep in mind that there are Glimmer CRuby (MRI) alternatives that have instant startup time like Glimmer DSL for LibUI, which has native widgets just like SWT and is a Fukuoka Ruby 2022 Special Award Winner (after getting judged by Matz, the creator of Ruby).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants