Skip to content

2_1_1

Choose a tag to compare

@fbourasse fbourasse released this 23 Jun 12:49
· 7 commits to main since this release
2bfe414

JCR Stats 2.1.1

Release date: 2026-06-23

A performance and maintenance release. JCR Stats now traverses the repository
significantly faster on large subtrees, with no change to the analysis output or
the admin UI. Drop-in upgrade from 2.1.0.

Highlights

  • Faster tree traversal — large-subtree computations no longer pay a
    per-node query cost, so deep/wide analyses finish noticeably quicker.
  • 🎯 More accurate — size and node counts now read committed repository state
    instead of possibly-lagging index state.

Improvements

Direct hierarchy traversal

The size computation now walks the JCR hierarchy directly via
JCRNodeWrapper.getNodes() instead of issuing one ISCHILDNODE JCR-SQL2 query per
node. This removes, at every node:

  • a query parse / plan / Lucene-index lookup, and
  • a redundant path re-resolution of each child.

The bigger and deeper the subtree, the larger the speed-up. Results are also more
accurate because traversal reads committed hierarchy state rather than the
query index, which can lag behind recent writes.

via a system property (see Configuration below). The default is the new direct
strategy; no action is required to get the improvement.

Reduced session overhead

session.refresh(false) now runs once at the start of a traversal instead of once
per node — eliminating needless per-node refresh work on a read-only walk.

Configuration

System property Values Default Effect
jcrStats.traversal direct, query direct direct uses getNodes() hierarchy iteration; query restores the legacy per-node ISCHILDNODE JCR-SQL2 strategy.

To A/B compare on the same build, set -DjcrStats.traversal=query in your
JAVA_OPTS / setenv, restart, run the same path, and compare the
INFO log line:

JCR stats computation finished for path in ms ( nodes visited)

Tests

  • Added JcrStatsTraversalTest covering the direct-traversal aggregation logic
    (size roll-up, node count, single-visit guarantee, size-descending child
    ordering) with mocked JCRNodeWrappers.

Upgrade notes

  • Drop-in upgrade from 2.1.0 — no API, permission, configuration, or data
    changes. Public GraphQL operations, the Karaf command, and the admin UI are
    unchanged.
  • The behavior change is internal (how children are fetched during traversal); the
    computed sizes and node counts are equivalent.

Compatibility

  • Requires Jahia 8.2.1.0 or later (unchanged from 2.1.0).