You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2015/04/17 08:06:58 UTC
[jira] [Commented] (CAMEL-8640) BacklogTracer allocates 100k
elements for an array even it is not enabled
[ https://issues.apache.org/jira/browse/CAMEL-8640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14499321#comment-14499321 ]
Claus Ibsen commented on CAMEL-8640:
------------------------------------
Yeah good idea. You are welcome to work on a patch / PR
http://camel.apache.org/contributing.html
> 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
> Fix For: 2.15.2, 2.16.0
>
>
> 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<DefaultBacklogTracerEventMessage> queue = new ArrayBlockingQueue<DefaultBacklogTracerEventMessage>(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)