Hotfix 3.2.x sup 19907 - #1782
Conversation
| @@ -1,48 +0,0 @@ | |||
| package com.gentics.mesh.cache; | |||
|
|
|||
| }); | ||
| result.putAll(resultStream.distinct().collect(Collectors.toMap(ContentKey::fromContent, Function.identity()))); | ||
| result.putAll(resultStream.distinct().collect(Collectors.toMap( | ||
| content -> ContentKey.fromContentUUIDAndVersionUUID( |
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
Improvement 4. By default the entities are not 2nd level cached. We make them cacheable here, except those explicitly marked with setCacheable(false).
| <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> |
There was a problem hiding this comment.
Improvement 5. Apply fixes of Hibernate self for the current minor version.
Abstract
Performance improvements over complex node data fetch
Checklist
General
/CHANGELOG.adocOn API Changes