You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2021/10/04 17:50:30 UTC

[qpid-dispatch] branch main updated: DISPATCH-1487: optimize view_initialize for NODE_HASH views

This is an automated email from the ASF dual-hosted git repository.

kgiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/main by this push:
     new 428fd29  DISPATCH-1487: optimize view_initialize for NODE_HASH views
428fd29 is described below

commit 428fd29b8fbbbc513a1219e3f45e306e7d55b525
Author: Kenneth Giusti <kg...@apache.org>
AuthorDate: Mon Sep 27 15:43:59 2021 -0400

    DISPATCH-1487: optimize view_initialize for NODE_HASH views
    
    This closes #1378
---
 src/iterator.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/iterator.c b/src/iterator.c
index 07a9ec9..7de9d63 100644
--- a/src/iterator.c
+++ b/src/iterator.c
@@ -287,6 +287,15 @@ static void view_initialize(qd_iterator_t *iter)
         return;
 
     //
+    // ITER_VIEW_NODE_HASH has no scheme or leading slash - see iterator.h
+    // Do not walk the entire iterator trying to find one.
+    //
+    if (iter->view == ITER_VIEW_NODE_HASH) {
+        parse_node_view(iter);
+        return;
+    }
+
+    //
     // Advance to the node-id.
     //
     state_t               state = STATE_START;
@@ -367,11 +376,6 @@ static void view_initialize(qd_iterator_t *iter)
             adjust_address_with_space(iter);
         return;
     }
-
-    if (iter->view == ITER_VIEW_NODE_HASH) {
-        parse_node_view(iter);
-        return;
-    }
 }
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org