Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-5995

Improve performance of bundle events processing in async listener

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.4
    • Fix Version/s: 5.4.0.1, 5.4.2-RC1, 5.4.2
    • Component/s: None
    • Tags:
    • Upgrade notes:
      Hide

      New method getNotificationEventNames in interface NotificationManager and NotificationRegistry

      Show
      New method getNotificationEventNames in interface NotificationManager and NotificationRegistry

      Description

      Async listener should not iterate on events when receiving EventBunde

      public void handleEvent(EventBundle events) {
      for (Event event : events)

      { handleEvent(event); }

      }

      For async listener events are ReconnectedEventBundle and iterating on them will reconnect all events, this means opening a session and create document model and context for each event (see ReconnectedEventBundleImpl.getReconnectedEvents())

      This is very expensive and useless if the listener is not interested in any event in the bundle.

      A first optimisation may be to use containsEventName in the listener to check if the interesting event is present in the bundle,
      that should not reconnect any events.

        Attachments

          Activity

            People

            • Assignee:
              bdelbosc Benoit Delbosc
              Reporter:
              bdelbosc Benoit Delbosc
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.