You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "reschke (via GitHub)" <gi...@apache.org> on 2026/01/20 16:54:58 UTC

[PR] JCRVLT-836: log durations and number of nodes in AggregateImpl node walk [jackrabbit-filevault]

reschke opened a new pull request, #409:
URL: https://github.com/apache/jackrabbit-filevault/pull/409

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JCRVLT-836: log durations and number of nodes in AggregateImpl node walk [jackrabbit-filevault]

Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #409:
URL: https://github.com/apache/jackrabbit-filevault/pull/409#issuecomment-3777008031

   please see https://stackoverflow.com/questions/1770010/how-do-i-measure-time-elapsed-in-java/1776053#1776053


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JCRVLT-836: log durations and number of nodes in AggregateImpl node walk [jackrabbit-filevault]

Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on code in PR #409:
URL: https://github.com/apache/jackrabbit-filevault/pull/409#discussion_r2710235294


##########
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java:
##########
@@ -780,6 +803,14 @@ private void prepare(Node node, boolean descend) throws RepositoryException {
                 }
             }
         }
+
+        Duration duration = Duration.ofNanos(System.nanoTime() - startTime);

Review Comment:
   Performance is not an issue here, no?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JCRVLT-836: log durations and number of nodes in AggregateImpl node walk [jackrabbit-filevault]

Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke merged PR #409:
URL: https://github.com/apache/jackrabbit-filevault/pull/409


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JCRVLT-836: log durations and number of nodes in AggregateImpl node walk [jackrabbit-filevault]

Posted by "kwin (via GitHub)" <gi...@apache.org>.
kwin commented on code in PR #409:
URL: https://github.com/apache/jackrabbit-filevault/pull/409#discussion_r2710132580


##########
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java:
##########
@@ -719,10 +737,15 @@ private void prepare(Node node, boolean descend) throws RepositoryException {
         // 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();

Review Comment:
   Why measure in nanos when emitting in ms only?



##########
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java:
##########
@@ -780,6 +803,14 @@ private void prepare(Node node, boolean descend) throws RepositoryException {
                 }
             }
         }
+
+        Duration duration = Duration.ofNanos(System.nanoTime() - startTime);

Review Comment:
   No need for Duration an time conversion if measuring in millis in the first place.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JCRVLT-836: log durations and number of nodes in AggregateImpl node walk [jackrabbit-filevault]

Posted by "kwin (via GitHub)" <gi...@apache.org>.
kwin commented on code in PR #409:
URL: https://github.com/apache/jackrabbit-filevault/pull/409#discussion_r2710136460


##########
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java:
##########
@@ -780,6 +803,14 @@ private void prepare(Node node, boolean descend) throws RepositoryException {
                 }
             }
         }
+
+        Duration duration = Duration.ofNanos(System.nanoTime() - startTime);

Review Comment:
   No need for Duration and time conversion if measuring in millis in the first place.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JCRVLT-836: log durations and number of nodes in AggregateImpl node walk [jackrabbit-filevault]

Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #409:
URL: https://github.com/apache/jackrabbit-filevault/pull/409#issuecomment-3775199719

   Of course we can use `Stopwatch` from commons-lang, but guess what timer is uses.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JCRVLT-836: log durations and number of nodes in AggregateImpl node walk [jackrabbit-filevault]

Posted by "kwin (via GitHub)" <gi...@apache.org>.
kwin commented on code in PR #409:
URL: https://github.com/apache/jackrabbit-filevault/pull/409#discussion_r2710154120


##########
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java:
##########
@@ -780,6 +803,14 @@ private void prepare(Node node, boolean descend) throws RepositoryException {
                 }
             }
         }
+
+        Duration duration = Duration.ofNanos(System.nanoTime() - startTime);

Review Comment:
   Also consider: https://stackoverflow.com/questions/19052316/why-is-system-nanotime-way-slower-in-performance-than-system-currenttimemill



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JCRVLT-836: log durations and number of nodes in AggregateImpl node walk [jackrabbit-filevault]

Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #409:
URL: https://github.com/apache/jackrabbit-filevault/pull/409#issuecomment-3777761774

   Thanks; I added a summary to the top, and will also avoid getting the nano time if we're not in DEBUG.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JCRVLT-836: log durations and number of nodes in AggregateImpl node walk [jackrabbit-filevault]

Posted by "kwin (via GitHub)" <gi...@apache.org>.
kwin commented on PR #409:
URL: https://github.com/apache/jackrabbit-filevault/pull/409#issuecomment-3776389914

   Why not System.currentTimeMillis() without any additional helpers?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JCRVLT-836: log durations and number of nodes in AggregateImpl node walk [jackrabbit-filevault]

Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on code in PR #409:
URL: https://github.com/apache/jackrabbit-filevault/pull/409#discussion_r2710235294


##########
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java:
##########
@@ -780,6 +803,14 @@ private void prepare(Node node, boolean descend) throws RepositoryException {
                 }
             }
         }
+
+        Duration duration = Duration.ofNanos(System.nanoTime() - startTime);

Review Comment:
   Performance is not an issue here, no? Also, millis depends on system timers, and granularity can be > 5ms on certain systems. Also, it fails (in the unlikely case) for clock adjustments.
   
   Duration becomes interesting when the # of ms get's high.
   
   https://stackoverflow.com/a/1776053



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JCRVLT-836: log durations and number of nodes in AggregateImpl node walk [jackrabbit-filevault]

Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on code in PR #409:
URL: https://github.com/apache/jackrabbit-filevault/pull/409#discussion_r2710235294


##########
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java:
##########
@@ -780,6 +803,14 @@ private void prepare(Node node, boolean descend) throws RepositoryException {
                 }
             }
         }
+
+        Duration duration = Duration.ofNanos(System.nanoTime() - startTime);

Review Comment:
   Performance is not an issue here, no? Also, millis depends on system timers, and granularity can be > 5ms on certain systems. Also, it fails (in the unlikely case) for clock adjustments.
   
   Duration becomes interesting when the # of ms get's high.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JCRVLT-836: log durations and number of nodes in AggregateImpl node walk [jackrabbit-filevault]

Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on code in PR #409:
URL: https://github.com/apache/jackrabbit-filevault/pull/409#discussion_r2710233696


##########
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java:
##########
@@ -719,10 +737,15 @@ private void prepare(Node node, boolean descend) throws RepositoryException {
         // 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();

Review Comment:
   Because it's the recommended way to measure elapsed time.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org