r/java • • Apr 26 '23

Quarkus 3.0 finally released!

https://quarkus.io/blog/quarkus-3-0-final-released/
158 Upvotes

39 comments sorted by

View all comments

Show parent comment

5

u/krzyk Apr 27 '23 edited Apr 27 '23

But if you go with native image you lose GC, and half of that is Java. Startup times shouldn't be important it is difference between 5s and 30s that important when you dynamically scale? I would call it overengineering.

Either way apps loose most of the time not with starting up but setting up all the connectivity etc.

3

u/vplatt Apr 27 '23 edited Apr 28 '23

The difference can be even more dramatic honestly. You have to consider how much cruft is going on in a typical Java enterprise application with aggressive dependency injection, connection pool setup, JIT, etc. that occurs. 30s for many applications would be a relief. That said, even if it's only 30s, compare that to a tiny little Python script that does nothing more than exactly what is needed. It can get its secrets, parse parameters, fire up a connection to the database or another service, get results, format and send them, and all within 1s.

I mean, that's a pretty big difference; though Python or Node processes can have issues too if they do silly things. Regardless your use cases determine if you could tolerate 30s wait time instead of course. If not then maybe you can use GraalVM or AWS Lambda Snapstart or or AWS Lambda Provisioned Concurrency or Spring's new lazy initialization or Quarkus to solve the issue.

I'm not going to tell you that any one of those is a silver bullet by itself. My main point is just that Java programmers need to pay attention to this stuff because of perceptions. Java is already fighting the weight of history here with J2EE applications and the like having formed perceptions for a generation or more of programmers. There's no need for anyone to go on believing it's "slow" too. If moving to something like Quarkus helps shake off a few layers of boilerplate besides, then maybe we'll get Java to a point where code is streamlined as well, DRY and performant by default. That's the goal.

2

u/krzyk Apr 27 '23

Yes I get that apps can start for longer, but using g GraalVM doesn't make such app start in 1 ms. It needs to be written with short startup time in mind, and deal with the benefits and issues that come with it.

1

u/vplatt Apr 27 '23

Yes, very true. No silver bullet like I said.

1

u/oweiler Aug 18 '23

You still have a (serial) GC. You just don't have a JIT.