|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
Event Correlator and Processed GroupsHi all,
I was looking through the EventCorrelator code and noticed the following method: protected final BoundedFifoBuffer processedGroups = new BoundedFifoBuffer(MAX_PROCESSED_GROUPS); protected boolean isGroupAlreadyProcessed(Object id) { synchronized (groupsLock) { return processedGroups.contains(id); } } It appears that everytime a new event group is received on the aggregator, it will traverse the entire queue of already processed groups to see if it has been processed yet. Since this queue is currently sitting at 50000 groups, this seems to be very inefficient. Wouldn't it make sense to also keep the processed groups in a collection object that offers a faster search mechanism? I understand we still need the queue, but the memory impact should be minimal as these are very small objects. Just looking for opinions and suggestions. Thanks, Rob |
|
|
Re: Event Correlator and Processed GroupsDo you have any numbers that it's really inefficient or is it just a theoretical assumption? I mean - 50000 objects is nothing to modern JVMs and hardware.
Andrew On Thu, Feb 26, 2009 at 11:19 AM, rstacy@... <rstacy@...> wrote:
|
|
|
Re: Event Correlator and Processed GroupsI have no numbers at this point. I will try and get some. It is just an assumption at this point. It definitely seems that there are more efficient ways of doing it.
|
|
|
Re: Event Correlator and Processed GroupsWe just ran into this issue as well. Here's some timing numbers we got on the isGroupAlreadyProcessed method:
First 10K calls: 40 seconds Second 10K calls: 120 seconds So this absolutely affects performance. As Rob pointed out, this is easily corrected. We added a HashSet that tracks the group ids in the BoundedFifoBuffer, let it handle the contains calls, and the total time for the isGroupAlreadyProcessed method calls drops to a fraction of a second. Our Collection Aggregator router now rocks even on high volumes.
|
|
|
Re: Event Correlator and Processed GroupsMind submitting a patch? Andrew On Apr 30, 2009 6:03 PM, "Richard Clayton" <richard@...> wrote: |
|
|
Re: Event Correlator and Processed GroupsWill do. Do I submit a Jira issue or do you?
Richard
|
|
|
Re: Event Correlator and Processed GroupsRichard,
You create a new issue at http://www.mulesource.org/jira/browse/MULE (free account registration if needed). Choose a Patch Submission issue type, I'll handle it from there. You can find more details here: http://www.mulesource.org/display/MULE/Getting+Involved HTH, Andrew On Thu, Apr 30, 2009 at 6:37 PM, Richard Clayton <richard@...> wrote:
|
|
|
Re: Event Correlator and Processed GroupsHi,
Can someone post the JIRA details for this patch ? A search with JIRA did not return the hoped result. Thanks! Luc
|
|
|
Re: Event Correlator and Processed GroupsHi Luc,
What exactly were you trying to locate? The patch is attached to jira posted above, here's the link once again: http://www.mulesource.org/jira/browse/MULE-4337 HTH, Andrew On Fri, Nov 6, 2009 at 9:59 AM, LucDP <luc@...> wrote:
|
| Free embeddable forum powered by Nabble | Forum Help |