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

Drop support for Java 8 #920

Closed
nicktelford opened this issue Feb 22, 2024 · 8 comments
Closed

Drop support for Java 8 #920

nicktelford opened this issue Feb 22, 2024 · 8 comments

Comments

@nicktelford
Copy link
Contributor

Java 9 introduced some significant optimizations to String concatenation that should improve the performance of jmx_exporter considerably, since it does a lot of String concatenation.

However, to gain this benefit, jmx_exporter must be compiled to target at least JDK 9.

Java 8 is (as of March 2024 this year) now 10 years old, and has been officially EOL by Oracle since March 2022.

I propose we bump the compiler source and target versions to 9. While OpenJDK 9 is also EOL, I don't see any benefit from requiring users to use anything higher just yet.

While there may be some users still using JDK 8, it should be quite unlikely.

@dhoard
Copy link
Collaborator

dhoard commented Feb 22, 2024

While I agree, that no one should be using Java 8 at this point, there are still users using it and vendors supporting it.

Azul has support for Java 8 until 2030

https://www.azul.com/products/azul-support-roadmap/

AWS has support for Corretto until May 2026

https://aws.amazon.com/about-aws/whats-new/2020/08/amazon-corretto-8-11-support-extended/

Removing support would be problematic for the community.

@nicktelford
Copy link
Contributor Author

@dhoard I had a feeling that would be the response, which is why I raised this as a discussion rather than a PR.

I'm curious, do you have evidence that there are users running JDK 8?

I wonder if it might be possible to produce multiple JARs. One for JDK 8, and one compiled for a newer JDK?

@dhoard
Copy link
Collaborator

dhoard commented Feb 22, 2024

This type of evidence is hard to prove/disprove.

I can only infer there are Java 8 users, hence possibly Java 8 JMX Exporter users, since multiple companies have paid extended support. (Oracle sells extended support until December 2030.)

@nicktelford
Copy link
Contributor Author

Fair point.

How about we create two Maven profiles, one for targeting JFK 8, and one to target JDK 9, then release multiple artifacts?

Shouldn't be too difficult to sort out, although looking through the CI, I couldn't determine how release artifacts are distributed to GitHub/Maven Central.

@dhoard
Copy link
Collaborator

dhoard commented Feb 22, 2024

We were generating two artifacts when we supported Java 6 and Java 8 and it was a total mess. I'll have to put some thought into an approach that will work.

@nicktelford
Copy link
Contributor Author

In the meantime, I'll build it myself. This should enable me to quantify any performance improvement.

@dhoard
Copy link
Collaborator

dhoard commented Apr 18, 2024

@nicktelford have you been able to quantify any performance improvements?

I have tested targeting different Java versions (8, 11, 17, 21) via pom.xml changes along with relevant integration test containers and everything works as expected. CI/CD changes would be required, but are manageable. It would be a 4x increase in published artifacts.

The dependent libraries in client_java are all compiled with a Java 8 target, so it may be a moot point since most of the String handling occurs in that code.

@dhoard
Copy link
Collaborator

dhoard commented May 16, 2024

Closing

@dhoard dhoard closed this as completed May 16, 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

2 participants