Show HN: Gradle plugin for faster Java compiles

sgammon | 36 points

Personally the solution to faster build times in Gradle, is to keep using Maven.

I never touch Gradle unless there is no way around it, like Android.

However, this looks like an interesting idea.

pjmlp | 2 days ago

OK let's say I have an online store I wrote in Spring Framework. What does my before and after development workflow look like after adopting your plugin? It's been a while since I've messed with Java, but how many seconds could it possibly need to fetch a bunch of jar files? I'd love to see an in-the-life-of kind of screencast of what the daily grind looks like for normal java devs these days, so I can understand why it's so slow.

For example, what does resolution mean? Does that mean fetching the pom.xml files from sonatype to figure out the dependency graph? Don't those HTTP requests normally go fast? Is Elide sort of like setting up an HTTP caching proxy between corp and sonatype?

jart | 2 days ago

Hypothetically, if you could daemonize javac, would JIT eventually kick in over multiple recompiles of the same code? The obvious use case for this would be IDEs, but I imagine it could work in CI too if you had some kind of persistent "compiler as a service" setup that outlived the runners.

Not to detract from the cool work done here, just curious if this other approach has been tried too.

alisonatwork | 2 days ago

Volker Simonis over at Amazon did some very cool benchmarks showing the impact this can have (i.e. native-imaging javac):

https://github.com/simonis/LeydenVsGraalNative

sgammon | 2 days ago

So elide is a tool to run {js|ts|py} [1]. How does it compile javac to native?

[1] https://github.com/elide-dev/elide

kristianp | 2 days ago

Would this result in the same .class that javac produces? I.e. at runtime is code compiled with this fundamentally different than code compiled with javac?

linksbro | 2 days ago

Interesting idea. I wonder how this would compare to native-imaging Gradle or Maven itself.

re-thc | 2 days ago

The underlying Elide tool looks amazing, and potentially solves all sorts of pain for me. Does the Kotlin compiler support plugins, e.g. serialisation? I can imagine they might be too reflective.

lemming | 2 days ago

Is there an equivalent maven plugin?

Also what's the licence for elide?

normie3000 | 2 days ago

Do you have benchmarks? How much of a difference does it make?

rjwalters | 2 days ago

interesting. I wonder how compares against mavend (mvnd , aka maven as a Daemon service) and his aggressive parallelization.

Zardoz84 | 2 days ago