You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "davsclaus (via GitHub)" <gi...@apache.org> on 2023/02/27 12:26:00 UTC

[GitHub] [camel] davsclaus commented on a diff in pull request #9426: (perf chores) camel-seda: cache queue reference to avoid costly operations in the hot path

davsclaus commented on code in PR #9426:
URL: https://github.com/apache/camel/pull/9426#discussion_r1118669914


##########
components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java:
##########
@@ -213,8 +215,14 @@ protected BlockingQueue<Exchange> createQueue() {
      * @return the reference, or <tt>null</tt> if no queue reference exists.
      */
     public synchronized QueueReference getQueueReference() {
-        String key = getComponent().getQueueKey(getEndpointUri());
-        QueueReference ref = getComponent().getQueueReference(key);
+        if (key == null) {

Review Comment:
   I wonder if this can be done in doStart - I assume getEndpointUri is static at the moment when its started, and maybe then this can be computed once, and then the synchronization may not be need at all



-- 
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: commits-unsubscribe@camel.apache.org

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