Static Java #107

Closed
opened 2022-05-06 13:10:14 +02:00 by RubenKelevra · 4 comments
Contributor

Hey guys,

I was wondering if someone already tried to compile java programs natively.

There's the JLang project which compiles Java source code to LLVM-IR which then can be compiled natively. But JLang looks quite dead.

And there's GraalVM which offers a way to create native images.

As Java programs tend to be very slow on startup and generally pretty memory hungry I thought it might be interesting to have a look at this. :)

Hey guys, I was wondering if someone already tried to compile java programs natively. There's the JLang project which [compiles Java source code to LLVM-IR](https://polyglot-compiler.github.io/JLang/user-manual.html) which then can be compiled natively. But JLang looks quite dead. And there's GraalVM which offers a way to create [native images](https://www.graalvm.org/22.0/reference-manual/native-image/BuildConfiguration/). As Java programs tend to be very slow on startup and generally pretty memory hungry I thought it might be interesting to have a look at this. :)
Owner

Hi @RubenKelevra,

while I would like speeding up java applications somewhat, the projects you suggested seem to me like a lot of PKGBUILD editing is needed (to an extent that you can call it a completely different package, IMHO).
I do not see this happening, since this would take up a considerable chuck of time, which I currently do not have (and probably never will). If we ever find something that can speed up java programs, without requiring massive manual efforts, I'm all ears.

Hi @RubenKelevra, while I would like speeding up java applications somewhat, the projects you suggested seem to me like a lot of PKGBUILD editing is needed (to an extent that you can call it a completely different package, IMHO). I do not see this happening, since this would take up a considerable chuck of time, which I currently do not have (and probably never will). If we ever find something that can speed up java programs, without requiring massive manual efforts, I'm all ears.
Author
Contributor

@anonfunc I found one package already using this on the AUR. Looks like setting one enviromental variable is enough (in this case):

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=lucene-grep-git

@anonfunc I found one package already using this on the AUR. Looks like setting one enviromental variable is enough (in this case): https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=lucene-grep-git
Author
Contributor

So it's more a make file replacement than a PKGBUILD patch... yeah but I see your point. :)

So it's more a make file replacement than a PKGBUILD patch... yeah but I see your point. :)
anonfunc added the
enhancement
label 2022-05-11 16:54:10 +02:00
Owner

Please reopen this if there is anything we can do with flags or the shim (if that is a thing sometimes in the future).

For the time, this is not feasible.

Please reopen this if there is anything we can do with flags or the shim (if that is a thing sometimes in the future). For the time, this is not feasible.
anonfunc added
wontfix
and removed
enhancement
labels 2023-06-03 14:01:20 +02:00
Sign in to join this conversation.
No description provided.