OpenJPA
  1. OpenJPA
  2. OPENJPA-2163 Lifecycle event callback occurs more often than expect
  3. OPENJPA-2168

Do not go through LifeCycleEventManager overhead if the Entity has declared to be excluded

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1, 2.3.0
    • Fix Version/s: 2.2.1, 2.3.0
    • Component/s: kernel, performance
    • Labels:
      None

      Description

      If the <exclude-default-listener> element is specified in the orm.xml, then we can skip the listener processing in our runtime. This capability has been in the code previously, I'm just moving it higher in the callstack to remove the overhead of the LEMManager earlier.

        Issue Links

          Activity

          Hide
          Kevin Sutter added a comment -

          I decided I didn't like this approach... Instead of relying on the <exclude-default-listeners/> element, we could just check if our LifeCycleEventManager processing has been "activated" or not. For example, if no callbacks, listeners, or handlers have been registered with the runtime, then we can make the fireEvent processing more efficient by skipping the associated overhead. Once one of these callbacks, listeners, or handlers have been registered, then we go back to our normal processing. Just a simple boolean "activated" switch.

          Show
          Kevin Sutter added a comment - I decided I didn't like this approach... Instead of relying on the <exclude-default-listeners/> element, we could just check if our LifeCycleEventManager processing has been "activated" or not. For example, if no callbacks, listeners, or handlers have been registered with the runtime, then we can make the fireEvent processing more efficient by skipping the associated overhead. Once one of these callbacks, listeners, or handlers have been registered, then we go back to our normal processing. Just a simple boolean "activated" switch.
          Hide
          Rick Curtis added a comment -

          Merged changes from trunk to 2.2.x.

          Show
          Rick Curtis added a comment - Merged changes from trunk to 2.2.x.

            People

            • Assignee:
              Kevin Sutter
              Reporter:
              Kevin Sutter
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development