Skip to content

Hotfix 3.2.x sup 19907 - #1782

Open
plyhun wants to merge 8 commits into
hotfix-3.2.xfrom
hotfix-3.2.x-sup-19907
Open

Hotfix 3.2.x sup 19907#1782
plyhun wants to merge 8 commits into
hotfix-3.2.xfrom
hotfix-3.2.x-sup-19907

Conversation

@plyhun

@plyhun plyhun commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Abstract

Performance improvements over complex node data fetch

Checklist

General

  • Added abstract that describes the change
  • Added changelog entry to /CHANGELOG.adoc
  • Ensured that the change is covered by tests
  • Ensured that the change is documented in the docs

On API Changes

  • Checked if the changes are breaking or not
  • Added GraphQL API if applicable
  • Added Elasticsearch mapping if applicable

@@ -1,48 +0,0 @@
package com.gentics.mesh.cache;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused = deleted.

});
result.putAll(resultStream.distinct().collect(Collectors.toMap(ContentKey::fromContent, Function.identity())));
result.putAll(resultStream.distinct().collect(Collectors.toMap(
content -> ContentKey.fromContentUUIDAndVersionUUID(

@plyhun plyhun Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improvement 1. For every content found, a schema version has been requested just to take its UUID and reference type. Since we already have this info in the content, this request can be eliminated fully.

.put("hibernate.cache.use_query_cache", Boolean.TRUE.toString())
.put("hibernate.cache.use_second_level_cache", Boolean.TRUE.toString());
.put("hibernate.cache.use_second_level_cache", Boolean.TRUE.toString())
.put("hibernate.criteria.plan_cache_enabled", Boolean.TRUE.toString())

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improvement 2. Fine tune query caches to support big payloads.

private void setStatisticsOptions(ImmutableMap.Builder<String, Object> optionBuilder) {
optionBuilder.put(AvailableSettings.GENERATE_STATISTICS, options.getStorageOptions().isGenerateStatistics());
optionBuilder.put(AvailableSettings.LOG_SLOW_QUERY, Long.toString(options.getStorageOptions().getSlowSqlThreshold()));
optionBuilder.put(AvailableSettings.USE_SQL_COMMENTS, options.getStorageOptions().isGenerateStatistics());

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging improvement.

.collect(collectingByNodeWithLanguageFallback(languageTags));

return contentByNode.values().stream().map(c -> new NodeContent(c.getNode(), c, languageTags, type));
return HibernateTx.get().contentDao().getNodes(schemaContent).map(p -> new NodeContent(p.getValue(), p.getKey(), languageTags, type));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improvement 3. Each c.getNode() throws a distinct database request. Those could be batch fetched.

<class>com.gentics.mesh.hibernate.data.domain.HibVersionPurgeJobImpl</class>
<class>com.gentics.mesh.hibernate.data.domain.MeshVersionEntityImpl</class>

<shared-cache-mode>DISABLE_SELECTIVE</shared-cache-mode>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improvement 4. By default the entities are not 2nd level cached. We make them cacheable here, except those explicitly marked with setCacheable(false).

Comment thread pom.xml
<vertx.version>5.0.12</vertx.version>
<dagger.version>2.56.2</dagger.version>
<hibernate.version>7.1.8.Final</hibernate.version>
<hibernate.version>7.1.35.Final</hibernate.version>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improvement 5. Apply fixes of Hibernate self for the current minor version.

@plyhun
plyhun requested a review from npomaroli August 24, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant