Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1365

ServiceState attribute notifications slow down startup/shutdown time considerably

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • jmx-core-1.1.3
    • jmx-1.1.5
    • JMX
    • org.apache.felix.framework 5.0.1

    Description

      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.

      Attachments

        Activity

          People

            bosschaert David Bosschaert
            joelrich Joel Richard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: