dotCMS / dotCMS/core

fix(velocity): Memory and sync issues

Open
#34,046 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #34050 by @wezell — closed without merging
OKR : Customer Support
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Problem Statement

There are a number of improvements we can make to velocity to improve its memory footprint. For starters, we do not even stream our responses, we turn them into String buffers and then send them.

Additionally, there are a number of places where we can use ThreadLocals to store buffers and arrays and not have to reallocate them on every page hit.

Also would like to get rid of the synchronized block in the DotResourceLoader that we have seen act up.

  • Retain full backward compatibility
  • Ensure all tests pass
  • Benchmark the code before and after
dotCMS Version

latest

Conversation link

https://dotcms.slack.com/archives/C04FRV45YR5/p1765222245235399

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 locating the velocity response handling and DotResourceLoader synchronization points mentioned in the issue. Establish baseline memory and synchronization benchmarks before changing anything, then run the full test suite and compare results. Done means backward compatibility is retained, tests pass, and the benchmark shows the intended memory and sync improvements.

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
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.