You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Joel Richard (JIRA)" <ji...@apache.org> on 2015/08/24 14:10:45 UTC
[jira] [Updated] (ARIES-1365) ServiceState attribute notifications
slow down startup/shutdown time considerably
[ https://issues.apache.org/jira/browse/ARIES-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joel Richard updated ARIES-1365:
--------------------------------
Attachment: 0001-ARIES-1365-ServiceState-attribute-notifications-slow.patch
[~bosschaert], I have attached a patch which allows to disable the attribute change notification. As expected, it has reduced the startup time quite a bit (between 16%-25%) and for the shutdown time it's even better.
Can you please review it and apply it if it's fine? Please note that I haven't worked with ManagedServices before and couldn't find many good examples about how to use it. Just let me know if it can be improved.
> ServiceState attribute notifications slow down startup/shutdown time considerably
> ---------------------------------------------------------------------------------
>
> Key: ARIES-1365
> URL: https://issues.apache.org/jira/browse/ARIES-1365
> Project: Aries
> Issue Type: Bug
> Components: JMX
> Affects Versions: jmx-core-1.1.3
> Environment: org.apache.felix.framework 5.0.1
> Reporter: Joel Richard
> Labels: performance, shutdown, startup
> Attachments: 0001-ARIES-1365-ServiceState-attribute-notifications-slow.patch
>
>
> Around 20% of the startup time of our Felix OSGI container is spent creating attribute notifications for changed services in ServiceState#getAttributeChangeNotification. This is so slow because for each notification it calls bundleContext.getAllServiceReferences to get all service ids.
> Here a few suggestions how this could be improved:
> - The ServiceState could maintain its own list of service ids which is updated according to the service events
> - The ServiceState could implement the NotificationEmitter directly and be aware when there are any listeners (in our case, there are mostly none).
> - Make it possible to disable the attribute change notifications with configuration property.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)