dotCMS / dotCMS/core

Java 25 Performance Improvements

Open
#35,991 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Team : Platform
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Description

Now that dotCMS runs on Java 25 (runtime 25.0.2-ms, default bytecode 25 — see #35914), a set of language and JVM capabilities become available that let us improve runtime performance, throughput, and resource efficiency across the platform. This Epic is the umbrella / tracking issue for that performance work.

The goal is not a single feature but a coordinated sweep of targeted improvements that take advantage of Java 25, each delivered as its own child PR/issue so they can be reviewed, benchmarked, and rolled back independently.

Why now
  • JEP 491 (Java 24+): synchronized no longer pins virtual threads. The classic "virtual threads + JDBC/legacy synchronized ⇒ carrier pinning" objection no longer applies, so we can safely migrate blocking I/O thread pools to virtual threads.
  • Modern GC, scoped values, and other Java 21→25 additions open further throughput/latency wins.
  • Much of dotCMS's hottest code is I/O-bound (cache persistence, DB access, HTTP), which is exactly where virtual threads and reduced thread-pool contention pay off.

Desired Outcome

We will consider this Epic successful when:

  • Hot I/O-bound thread pools are migrated to virtual threads where it measurably helps, with no regression in correctness, memory footprint, or shutdown behavior.
  • Each improvement is backed by a before/after benchmark or a clear architectural rationale.
  • No increase in error rates (e.g. connection-pool timeouts) or cache rebuild storms under load.
  • Changes are individually flag-/config-gated or independently revertable.

Candidate child work

  • H22 cache async commits → virtual threads — replace the fixed 5-thread ThreadPoolExecutor with a virtual-thread-per-task executor; preserve backpressure and bound concurrent DB writes against the Hikari pool. (first child PR)
  • Audit other blocking thread pools / ExecutorService usages for virtual-thread suitability.
  • Evaluate GC / JVM flag tuning for the Java 25 runtime.
  • Identify and benchmark additional I/O-bound hotspots (REST, ES, DB access layers).
  • Review opportunities from newer concurrency APIs (e.g. scoped values, structured concurrency) where stable.

This list is expected to grow; new child issues/PRs should reference this Epic.

Links

  • Java 25 migration: #35914
  • CI variant follow-up: #35915

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by scoping the H22 cache async-commit work, including the fixed five-thread ThreadPoolExecutor, as an independent child issue; no source file or test is named here. Define a before/after benchmark and verify preserved backpressure, bounded Hikari-pool writes, correctness, memory footprint, and shutdown behavior before expanding to other Java 25 performance candidates.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.