This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git
The following commit(s) were added to refs/heads/main by this push:
new beab939 [SPARK-55808] Use `-XX:+UseCompactObjectHeaders` for Java 25+
GitHub Actions `build-test` jobs
beab939 is described below
commit beab9390c48a614bb2cdd1e8d1b235519bd2237a
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Mon Mar 2 20:08:38 2026 -0800
[SPARK-55808] Use `-XX:+UseCompactObjectHeaders` for Java 25+ GitHub
Actions `build-test` jobs
### What changes were proposed in this pull request?
This PR aims to use `-XX:+UseCompactObjectHeaders` for Java 25+ GitHub
Actions `build-test` jobs
### Why are the changes needed?
To use Java 25 Compact Object Headers (`-XX:+UseCompactObjectHeaders`) for
the `spark-kubernetes-operator` container. This feature is known to reduce
significantly the memory footprint of Java objects.
- https://openjdk.org/jeps/519
> In one setting, the SPECjbb2015 benchmark uses [22% less heap space and
8% less CPU
time](https://github.com/rkennke/talks/blob/master/Lilliput-FOSDEM-2025.pdf).
>
> In another setting, the number of garbage collections done by SPECjbb2015
is [reduced by
15%](https://bugs.openjdk.org/browse/JDK-8350457?focusedId=14766358&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14766358),
with both the G1 and Parallel collectors.
>
> A highly parallel JSON parser benchmark [runs in 10% less
time](https://www.reddit.com/r/scala/comments/1jptiv3/xxusecompactobjectheaders_is_your_new_turbo/?rdt=40432).
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: `Gemini 3.1 Pro (High)` on `Antigravity`.
Closes #534 from dongjoon-hyun/SPARK-55808.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
.github/workflows/build_and_test.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/workflows/build_and_test.yml
b/.github/workflows/build_and_test.yml
index 991082b..5d0cdbe 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -48,6 +48,9 @@ jobs:
cache: 'gradle'
- name: Build with Gradle
run: |
+ if [[ "${{ matrix.java-version }}" == "25" || "${{
matrix.java-version }}" == "26-ea" ]]; then
+ export JDK_JAVA_OPTIONS="-XX:+UseCompactObjectHeaders"
+ fi
./gradlew build
build-image:
name: "Build Operator Image CI"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]