[ 
https://issues.apache.org/jira/browse/FELIX-1913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793960#action_12793960
 ] 

Carsten Ziegeler commented on FELIX-1913:
-----------------------------------------

The processing of async events is very slow as well as they are put in a queue 
as well - this could be done in parallel, too. In the meantime I've rewritten 
the event admin as a proof of concept. My version now uses a thread pool 
(currently from jdk 1.5 - but this can be backportet for older java versions). 
The events are processed in parallel (if possible) by using this thread pool. 
This gives a real performance boost with lots of events and several listeners.
Just as an example: I create 1000 events which are sent directly one after the 
other and 4 listeners - each listeners takes 50ms - each listener gets each 
event.
As the listeners are processed one after other a single event delivery takes 
200ms. The old implementation processes the 1000 events one after the other - 
so the total delivery time is 1000 * 200ms.
The new implementation takes a configurable thread pool - in my example I use 
25 threads - therefore 25 events are processed in parallel, total delivery time 
goes down to 40 * 200ms

> All events are processed in a queue
> -----------------------------------
>
>                 Key: FELIX-1913
>                 URL: https://issues.apache.org/jira/browse/FELIX-1913
>             Project: Felix
>          Issue Type: Improvement
>          Components: Event Admin
>    Affects Versions: eventadmin 1.0.0
>            Reporter: Carsten Ziegeler
>            Assignee: Karl Pauls
>            Priority: Minor
>         Attachments: ea.patch
>
>
> The current event admin implementation puts all events into a  queue and 
> processes this queue in one thread. This creates a bottleneck when different 
> threads send events as they have to wait for other threads to be processed 
> first. Events from different threads can be processed in parallel.
> In the async mode, event deliver might take a long time as these events are 
> processed one after the other as well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to