Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D364F179D2 for ; Mon, 4 May 2015 16:53:09 +0000 (UTC) Received: (qmail 363 invoked by uid 500); 4 May 2015 16:53:09 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 283 invoked by uid 500); 4 May 2015 16:53:09 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 234 invoked by uid 99); 4 May 2015 16:53:09 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 May 2015 16:53:09 +0000 Date: Mon, 4 May 2015 16:53:09 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-8640) BacklogTracer allocates 100k elements for an array even it is not enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-8640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14526837#comment-14526837 ] ASF GitHub Bot commented on CAMEL-8640: --------------------------------------- Github user rbudzko closed the pull request at: https://github.com/apache/camel/pull/508 > BacklogTracer allocates 100k elements for an array even it is not enabled > ------------------------------------------------------------------------- > > Key: CAMEL-8640 > URL: https://issues.apache.org/jira/browse/CAMEL-8640 > Project: Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 2.15.1 > Reporter: Mateusz Nowakowski > Assignee: Claus Ibsen > Priority: Minor > Fix For: 2.16.0, 2.15.3 > > > By default each camel context has one BacklogTracer which is by default disabled. > However BacklogTracer contains a queue with > {code} > public static final int MAX_BACKLOG_SIZE = 100 * 1000; > private final Queue queue = new ArrayBlockingQueue(MAX_BACKLOG_SIZE); > {code} > The easiest way: > is it possible to replace it with LinkedBlockingQueue(int capacity)? > Ideally the object could be initialized only when it is enabled but it seems BacklogTracer is not fully encapsulated (the queue reference is maintained also outside BacklogTracer in BacklogTracerAdvice) -- This message was sent by Atlassian JIRA (v6.3.4#6332)