
"Two features caught our attention: Compact Object Headers shrinks object headers from 96-128 bits down to 64 bits. Introduced as experimental in Java 24, it became a standard feature in Java 25. Services with millions of small objects in memory (most long-running Scala applications) benefit directly from reduced heap usage. A post by Andriy Plokhotnyuk on r/scala first caught our attention on this one."
"Java's six-month release cadence delivers regular performance wins. For Scala services, these often come "for free" with no code changes required. String Deduplication with G1 identifies duplicate strings and collapses them to share the same underlying char[] array. Backend services typically hold a lot of repetitive string data: configuration values, JSON keys, or any identifier which an underlying string representation. The recent G1 improvements in JDK 25 make this feature more effective than before."
The backend services run Scala 3 on the JVM and were previously packaged in containers using Eclipse Temurin JRE 24. Metrics come from a high-traffic service that spends significant time parsing and decoding JSON and Protobuf payloads, creating many objects and strings. Java 25 introduced Compact Object Headers (96-128 bits down to 64 bits) and improved G1 string deduplication that collapse duplicate strings to a shared char[] array. The rollout proceeded incrementally, enabling one feature at a time across several days to isolate impact and attribute anomalies to specific changes. An initial upgrade to Java 25 without flags produced no significant changes in memory, CPU, or GC behavior.
Read at Medium
Unable to calculate read time
Collection
[
|
...
]