You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by re...@apache.org on 2026/01/20 16:50:36 UTC
(jackrabbit-filevault) 01/02: Revert "JCRVLT-836: log durations and number of nodes in AggregateImpl node walk"
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch JCRVLT-836
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git
commit 0444ce6c82fc2784b8490770370f9bb4152f6dee
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Tue Jan 20 17:49:03 2026 +0100
Revert "JCRVLT-836: log durations and number of nodes in AggregateImpl node walk"
This reverts commit 68909428e148cc1e2d4302bd31b5324d4eba0874.
---
.../jackrabbit/vault/fs/impl/AggregateImpl.java | 31 ----------------------
1 file changed, 31 deletions(-)
diff --git a/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java b/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java
index 9b50ceb2..28b0e71b 100644
--- a/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java
+++ b/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java
@@ -29,7 +29,6 @@ import javax.jcr.Value;
import java.io.IOException;
import java.lang.ref.WeakReference;
-import java.time.Duration;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -105,8 +104,6 @@ public class AggregateImpl implements Aggregate {
private List<AggregateImpl> leaves;
private String[] namespacePrefixes;
- private long nodesVisitedForPrefixScanning;
- private long siblingNodesInOrderedCollectionVisitedForPrefixScanning;
private char state = STATE_INITIAL;
@@ -628,21 +625,10 @@ public class AggregateImpl implements Aggregate {
}
try {
load();
- log.debug("starting namespace prefix walk of '{}'", this.path);
- long start = System.nanoTime();
Set<String> prefixes = new HashSet<String>();
// need to traverse the nodes to get all namespaces
loadNamespaces(prefixes, "", getNode());
namespacePrefixes = prefixes.toArray(new String[prefixes.size()]);
- Duration duration = Duration.ofNanos(System.nanoTime() - start);
- log.debug(
- "namespace prefix walk of '{}', visited {} nodes (of which {} siblings in ordered collections), prefixes: {}, elapsed {}ms, ({})",
- this.path,
- this.nodesVisitedForPrefixScanning,
- this.siblingNodesInOrderedCollectionVisitedForPrefixScanning,
- this.namespacePrefixes,
- duration.toMillis(),
- duration);
} catch (RepositoryException e) {
throw new IllegalStateException("Internal error while loading namespaces", e);
}
@@ -651,7 +637,6 @@ public class AggregateImpl implements Aggregate {
private void loadNamespaces(Set<String> prefixes, String parentPath, Node node) throws RepositoryException {
String name = node.getName();
- nodesVisitedForPrefixScanning += 1;
addNamespace(prefixes, name);
for (PropertyIterator iter = node.getProperties(); iter.hasNext(); ) {
Property p = iter.nextProperty();
@@ -670,11 +655,8 @@ public class AggregateImpl implements Aggregate {
Node c = iter.nextNode();
String relPath = parentPath + "/" + c.getName();
if (includes(relPath)) {
- nodesVisitedForPrefixScanning += 1;
loadNamespaces(prefixes, relPath, c);
} else if (hasOrderableChildNodes) {
- nodesVisitedForPrefixScanning += 1;
- siblingNodesInOrderedCollectionVisitedForPrefixScanning += 1;
addNamespace(prefixes, c.getName());
}
}
@@ -737,15 +719,10 @@ public class AggregateImpl implements Aggregate {
// get a node iterator suitable for the current node and the applicable filters
NodeIterator nIter = getNodeIteratorFor(node, filter);
- log.debug("starting aggregate walk of '{}'", this.path);
- int visited = 0;
- long startTime = System.nanoTime();
-
// include "our" nodes to the include set and delegate the others to the
// respective aggregator building sub aggregates
while (nIter.hasNext()) {
Node n = nIter.nextNode();
- visited += 1;
String path = n.getPath();
log.trace("checking {}", path);
@@ -803,14 +780,6 @@ public class AggregateImpl implements Aggregate {
}
}
}
-
- Duration duration = Duration.ofNanos(System.nanoTime() - startTime);
- log.debug(
- "aggregate walk of '{}', visited {} siblings in {}ms ({})",
- node.getPath(),
- visited,
- duration.toMillis(),
- duration);
}
private static NodeIterator getNodeIteratorFor(Node node, WorkspaceFilter filter) throws RepositoryException {